How to: Install VMware Tools in Linux

Install from ISO

1 Launch VMware Workstation

2 Start the Virtual Machine

3 Right click on the Virtual Machine Name on the tab

4 Click on “Install VMware Tools”

Parameter for “./vmware-install.pl”

-d: Use default/suggested answers for questions

-f: Force install

# Debian/Ubuntu etc.
#Mount to /mnt
sudo mount /dev/sr0 /mnt
#Extract, install
tar -zxvf /mnt/VMwareTools-versionNumber.tar.gz -C ~
cd vmware-tools-distrib/
sudo ./vmware-install.pl -f -d

When done, eject the ISO, reboot the operating system

sudo unmout /mnt
eject
sudo reboot

# CentOS/Fedora/RHEL etc.
#Mount to /mnt
mount /dev/sr0 /mnt
#Extract, install
tar -zxvf /mnt/VMwareTools-versoinNumber.tar.gz -C ~
cd vmware-tools-distrib/
./vmware-install.pl -f -d

Install VMware Tools from Online source/Package Manager

# Debian/Ubuntu etc.
#System without desktop environment
sudo apt install open-vm-tools
 
#System with desktop environment
sudo apt install open-vm-tools-desktop
# CentOS/Fedora/RHEL etc.
#System without desktop environment
dnf -y install open-vm-tools
or
yum -y install open-vm-tools
 
#System with desktop environment
dnf -y install open-vm-tools-desktop
or
yum -y install open-vm-tools-desktop

How to: Check Linux disk/partition information (Alternative to df)

To check Linux partition/disk usage, mount, file system types information etc. we can use df command which mentioned in “Useful commands to look up system information, install package etc. (Linux, Debian, Ubuntu, Kali Linux, RedHat, CentOS etc.)

We can also use another alternative to df which is di

1 Install

# Debian/Ubuntu/Kali Linux etc.
sudo apt install di
 
# CentOS/Fedora/RHEL
sudo dnf install di

2 Usage

2.1 Default output

[email protected]:~$ di
Filesystem         Mount               Size     Used    Avail %Used  fs Type
/dev/sda2          /                 196.3G    15.2G   171.1G   13%  ext4   
/dev/sda1          /boot/efi         511.0M     0.1M   510.8M    0%  vfat   
tmpfs              /dev/shm            1.9G     0.0G     1.9G    0%  tmpfs  
tmpfs              /run              391.3M    15.8M   375.4M    4%  tmpfs  
tmpfs              /run/lock           5.0M     0.0M     5.0M    0%  tmpfs  
tmpfs              /run/user/1000    391.3M     0.0M   391.3M    0%  tmpfs  
tmpfs              /sys/fs/cgroup      1.9G     0.0G     1.9G    0%  tmpfs
di
di

(By default di uses human readable units, with df we need to use -h switch “df -h”)

2.2 Show detailed mount point information, special device name etc.

di -A
[email protected]:~$ di -A
Mount          fs Type Filesystem 
        Options                                                                                               
            Size     Used     Free %Used  %Free 
            Size     Used    Avail %Used  %Free 
            Size     Used    Avail %Used  
           Inodes     IUsed     IFree %IUsed
/              ext4    /dev/sda2  
        rw,relatime,errors=remount-ro                                                                         
          196.3G    15.2G   181.2G    8%    92%  
          196.3G    25.2G   171.1G   13%    87%  
          186.3G    15.2G   171.1G    8%  
         13165632    570127  12595505    4% 
/boot/efi      vfat    /dev/sda1  
        rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 
          511.0M     0.1M   510.8M    0%   100%  
          511.0M     0.1M   510.8M    0%   100%  
          511.0M     0.1M   510.8M    0%  
                0         0         0    0% 
/dev/shm       tmpfs   tmpfs      
        rw,nosuid,nodev                                                                                       
            1.9G     0.0G     1.9G    0%   100%  
            1.9G     0.0G     1.9G    0%   100%  
            1.9G     0.0G     1.9G    0%  
           500837         1    500836    0% 
/run           tmpfs   tmpfs      
        rw,nosuid,nodev,noexec,relatime,size=400672k,mode=755                                                 
          391.3M    15.8M   375.4M    4%    96%  
          391.3M    15.8M   375.4M    4%    96%  
          391.3M    15.8M   375.4M    4%  
           500837       668    500169    0% 
/run/lock      tmpfs   tmpfs      
        rw,nosuid,nodev,noexec,relatime,size=5120k                                                            
            5.0M     0.0M     5.0M    0%   100%  
            5.0M     0.0M     5.0M    0%   100%  
            5.0M     0.0M     5.0M    0%  
           500837         4    500833    0% 
/run/user/1000 tmpfs   tmpfs      
        rw,nosuid,nodev,relatime,size=400668k,mode=700,uid=1000,gid=1000                                      
          391.3M     0.0M   391.3M    0%   100%  
          391.3M     0.0M   391.3M    0%   100%  
          391.3M     0.0M   391.3M    0%  
           500837        28    500809    0% 
/sys/fs/cgroup tmpfs   tmpfs      
        ro,nosuid,nodev,noexec,mode=755                                                                       
            1.9G     0.0G     1.9G    0%   100%  
            1.9G     0.0G     1.9G    0%   100%  
            1.9G     0.0G     1.9G    0%  
           500837        17    500820    0% 
di -A
di -A

2.3 Show all mounted devices

di -a
[email protected]:~$ di -a
Filesystem         Mount               Size     Used    Avail %Used  fs Type            
/dev/sda2          /                 196.3G    15.2G   171.1G   13%  ext4               
/dev/sda1          /boot/efi         511.0M     0.1M   510.8M    0%  vfat               
udev               /dev                1.9G     0.0G     1.9G    0%  devtmpfs           
hugetlbfs          /dev/hugepages      0.0M     0.0M     0.0M    0%  hugetlbfs          
mqueue             /dev/mqueue         0.0M     0.0M     0.0M    0%  mqueue             
devpts             /dev/pts            0.0M     0.0M     0.0M    0%  devpts             
tmpfs              /dev/shm            1.9G     0.0G     1.9G    0%  tmpfs              
proc               /proc               0.0M     0.0M     0.0M    0%  proc               
systemd-1          /proc/sys/fs/bi     0.0M     0.0M     0.0M    0%  autofs             
binfmt_misc        /proc/sys/fs/bi     0.0M     0.0M     0.0M    0%  binfmt_misc        
tmpfs              /run              391.3M    15.8M   375.4M    4%  tmpfs              
tmpfs              /run/lock           5.0M     0.0M     5.0M    0%  tmpfs              
sunrpc             /run/rpc_pipefs     0.0M     0.0M     0.0M    0%  rpc_pipefs         
tmpfs              /run/user/1000    391.3M     0.0M   391.3M    0%  tmpfs              
/dev/fuse          /run/user/1000/     0.0M     0.0M     0.0M    0%  fuse               
gvfsd-fuse         /run/user/1000/     0.0M     0.0M     0.0M    0%  fuse.gvfsd-fuse    
vmware-vmblock     /run/vmblock-fu     0.0M     0.0M     0.0M    0%  fuse.vmware-vmblock
sysfs              /sys                0.0M     0.0M     0.0M    0%  sysfs              
efivarfs           /sys/firmware/e     0.0M     0.0M     0.0M    0%  efivarfs           
none               /sys/fs/bpf         0.0M     0.0M     0.0M    0%  bpf                
tmpfs              /sys/fs/cgroup      1.9G     0.0G     1.9G    0%  tmpfs              
cgroup             /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup             
cgroup             /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup             
cgroup             /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup             
cgroup             /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup             
cgroup             /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup             
cgroup             /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup             
cgroup             /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup             
cgroup             /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup             
cgroup             /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup             
cgroup             /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup             
cgroup             /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup             
cgroup2            /sys/fs/cgroup/     0.0M     0.0M     0.0M    0%  cgroup2            
fusectl            /sys/fs/fuse/co     0.0M     0.0M     0.0M    0%  fusectl            
pstore             /sys/fs/pstore      0.0M     0.0M     0.0M    0%  pstore             
debugfs            /sys/kernel/deb     0.0M     0.0M     0.0M    0%  debugfs            
securityfs         /sys/kernel/sec     0.0M     0.0M     0.0M    0%  securityfs
di -a
di -a

2.4 Produce CSV style output

di -c
[email protected]:~$ di -c
s,m,b,u,v,p,T
"/dev/sda2","/","196.3G","15.2G","171.1G",13%,"ext4"
"/dev/sda1","/boot/efi","511.0M","0.1M","510.8M",0%,"vfat"
"tmpfs","/dev/shm","1.9G","0.0G","1.9G",0%,"tmpfs"
"tmpfs","/run","391.3M","15.8M","375.4M",4%,"tmpfs"
"tmpfs","/run/lock","5.0M","0.0M","5.0M",0%,"tmpfs"
"tmpfs","/run/user/1000","391.3M","0.0M","391.3M",0%,"tmpfs"
"tmpfs","/sys/fs/cgroup","1.9G","0.0G","1.9G",0%,"tmpfs"
di -c
di -c

2.5 Output size in Gigabyte

di -g

We can also use -k or -m to indicate output in K or M

[email protected]:~$ di -g
Filesystem         Mount              Gibis     Used    Avail %Used  fs Type
/dev/sda2          /                  196.3     15.2    171.1   13%  ext4   
/dev/sda1          /boot/efi            0.5      0.0      0.5    0%  vfat   
tmpfs              /dev/shm             1.9      0.0      1.9    0%  tmpfs  
tmpfs              /run                 0.4      0.0      0.4    4%  tmpfs  
tmpfs              /run/lock            0.0      0.0      0.0    0%  tmpfs  
tmpfs              /run/user/1000       0.4      0.0      0.4    0%  tmpfs  
tmpfs              /sys/fs/cgroup       1.9      0.0      1.9    0%  tmpfs
di -g
di -g

2.6 Display information for specific file system

di -I filesystem
 
e.g.
di -I tmpfs
[email protected]:~$ di -I tmpfs 
Filesystem         Mount               Size     Used    Avail %Used  fs Type
tmpfs              /dev/shm            1.9G     0.0G     1.9G    0%  tmpfs  
tmpfs              /run              391.3M    15.8M   375.4M    4%  tmpfs  
tmpfs              /run/lock           5.0M     0.0M     5.0M    0%  tmpfs  
tmpfs              /run/user/1000    391.3M     0.0M   391.3M    0%  tmpfs  
tmpfs              /sys/fs/cgroup      1.9G     0.0G     1.9G    0%  tmpfs
di -I tmpfs
di -I tmpfs

2.7 Skip title row

di -n
[email protected]:~$ di -n
/dev/sda2          /                 196.3G    15.2G   171.1G   13%  ext4   
/dev/sda1          /boot/efi         511.0M     0.1M   510.8M    0%  vfat   
tmpfs              /dev/shm            1.9G     0.0G     1.9G    0%  tmpfs  
tmpfs              /run              391.3M    15.8M   375.4M    4%  tmpfs  
tmpfs              /run/lock           5.0M     0.0M     5.0M    0%  tmpfs  
tmpfs              /run/user/1000    391.3M     0.0M   391.3M    0%  tmpfs  
tmpfs              /sys/fs/cgroup      1.9G     0.0G     1.9G    0%  tmpfs
di -n
di -n

2.8 Show total count at the bottom of the output

di -t
[email protected]:~$ di -t
Filesystem         Mount               Size     Used    Avail %Used  fs Type
/dev/sda2          /                 196.3G    15.2G   171.1G   13%  ext4   
/dev/sda1          /boot/efi         511.0M     0.1M   510.8M    0%  vfat   
tmpfs              /dev/shm            1.9G     0.0G     1.9G    0%  tmpfs  
tmpfs              /run              391.3M    15.8M   375.4M    4%  tmpfs  
tmpfs              /run/lock           5.0M     0.0M     5.0M    0%  tmpfs  
tmpfs              /run/user/1000    391.3M     0.0M   391.3M    0%  tmpfs  
tmpfs              /sys/fs/cgroup      1.9G     0.0G     1.9G    0%  tmpfs  
                   Total             201.4G    15.2G   176.2G   13%
di -t
di -t

2.9 Sort the output

# Sort by name of the mount point
di -sm
[email protected]:~$ di -sm
Filesystem         Mount               Size     Used    Avail %Used  fs Type
/dev/sda2          /                 196.3G    15.2G   171.1G   13%  ext4   
/dev/sda1          /boot/efi         511.0M     0.1M   510.8M    0%  vfat   
tmpfs              /dev/shm            1.9G     0.0G     1.9G    0%  tmpfs  
tmpfs              /run              391.3M    15.8M   375.4M    4%  tmpfs  
tmpfs              /run/lock           5.0M     0.0M     5.0M    0%  tmpfs  
tmpfs              /run/user/1000    391.3M     0.0M   391.3M    0%  tmpfs  
tmpfs              /sys/fs/cgroup      1.9G     0.0G     1.9G    0%  tmpfs
di -sm
di -sm

-s: sort

m: Order by mountpoint (Default)

n: Do not sort (Use the order from “/etc/fstab”)

s: Order by name of special device

t: Order by type of fil esystem

r: Reverse the order

Sort switch can be mixed, e.g. di -stsrm: Type, Device, Mount point in reverse order. di strsrm: Type, Device in reverse order, mount point.

2.10 Specify output format

# Output mount point name
di -fm
 
# Output file system type
di -ft
[email protected]:~$ di -fm
Mount          
/              
/boot/efi      
/dev/shm       
/run           
/run/lock      
/run/user/1000 
/sys/fs/cgroup
di -fm
di -fm
di -ft
di -ft

man page of di

di(1)                                                                                                  General Commands Manual                                                                                                  di(1)
Name
       di - disk information
Synopsis
       di [-AacghHklLmnPqRtZ] [-B block-size] [-d display-size] [-f format] [-I include-fstyp-list] [-s sort-type] [-w block-width] [-W inode-width] [-x exclude-fstyp-list] [-X debug-level] [-z zone-name] [file [...]]
       mi
Description
       di  Displays  usage information on mounted filesystems.  Block values are reported in a human readable format.  If the user or group has a disk quota, the values reported are adjusted according the quotas that apply to the
       user.
       If file is specified, the usage information for the partition on which file is located is printed.
       Unless the -a flag is specified, the following mounted filesystems will not normally be displayed: filesystems with total space <= 0; loopback filesystems that are duplicates of other normally mounted filesystems (filesys‐
       tem type of 'lofs' , 'none', or 'nullfs'); loopback filesystems that are part of a zone (Solaris).
       Filesystems that the user does not have permissions to access will not be displayed at all.
       mi Displays the mounted filesystem information.
       Several options may be specified to control the output of di and mi:
       -A     Print all fields (used for debugging).  Mount points and special device names are printed at full width.
       -a     (compatibility: --all)
              Prints all mounted devices (normally, those with 0 total space are not printed - e.g. /dev/proc, /dev/fd).
       -B     block-size (compatibility: --block-size, -b)
              Change the base block size from 1024 (default) to the size specified.  block-size may be one of: k - 1024 bytes, si - 1000 bytes, or a specific size.
       -c     (alias: --csv-output)
              Comma separated values are output.  The titles are output as the format string specifiers.  Totals are turned off. See also the -n flag.
       -C     (alias: --csv-tabs)
              Values are output with tab separators.  See also the -c option.
       -d     display-size (alias: --display-size)
              Display  the  usage  in  units  specified  by  display-size.   Note  that if the base block size is SI units of 1000 bytes, the display size is calculated using those units.  display-size may be one of: 512 - POSIX,
              k - kilobytes, m - megabytes, g - gigabytes, t - terabytes, p - petabytes, e - exabytes, z - zettabytes, y - yottabytes, h - Scaled alternative 1, H - Scaled alternative 2, or a specific value to use  as  the  block
              size.
              Block display sizes greater than 1024 bytes are displayed with a precision of one decimal place after the radix.
              The Scaled alternatives scale the sizes displayed and appends a suffix (e.g. 48.0k, 3.4M).
              With scaled alternative 1, sizes within a line may scale to different units.
              Scaled alternative 2 scales all the sizes in each individual line to the same unit size (the largest needed).
       -f     format Use the specified format string format.  See the Format Strings section.
       -g     (alias for: -dg)
              Display sizes in gigabytes.
       -h     (alias for: -dh)
              Display partition sizes in scaled alternative 1 format.
       --help
              Display some basic usage information.
       -H     (alias for: -dH; compatibility: --human-readable)
              Display partition sizes in scaled alternative 2 format.
       -I     include-fstype-list (compatibility: -F, --type)
              Include  only  the  file  system  types listed in include-fstyp-list.  The list is a comma separated list of file system types.  Multiple -I options may be specified.  If the 'fuse' filesystem type is specified, all
              fuse* filesystems will be included.
              e.g. -I nfs,tmpfs or -I nfs -I tmpfs.
       --inodes
              Ignored.  Use the -f option.
       -k     (alias for: -dk)
              Display sizes in Kbytes.
       -l     (compatibility: --local)
              Display only local file systems.
       -L     Turn off check for duplicate filesystems (loopback (lofs/none) mounts).
       -m     (alias for: -dm)
              Display sizes in megabytes.
       -n     Do not print a header line above the list of file systems.  Useful when parsing the output of di.
       --no-sync
              Ignored.
       -P     (compatibility: --portability)
              Output format is POSIX standard.  512 byte block size is the default.  The -k option may be used.
       --print-type
              Ignored.  Use the -f option.
       -q     Disable quota checks.
       -R     (also: --dont-resolve-symlinks)
              Do not resolve symlinks (for mount points that have a trailing UUID).
       -s     sort-type
              Use sort-type to sort the output.  The output of di is normally sorted by mount point.  The following sort flags may be used to change the sort order: m - by mount point (default); n - leave unsorted (as it  appears
              in  the  mount  table); s - by special device name; T - by total space; f - by free space; a - by available space; t - by filesystem type; r - reverse the sort order; This will apply to all sort flags following this
              sort flag.
              These sort options may be combined in any order.  e.g.:
              di -stsrm # by type, special, reversed mount;
              di -strsrm # by type, reversed special, mount.
       --si   An alias for -dH -Bsi.
       --sync Ignored.
       -t     (compatibility: --total)
              Print a totals line below the list of file systems.  Pooled filesystems (zfs, advfs) have only the main pool added to the total.  It is up to the user to exclude (using the -x option)  read-only  filesystems  (cdfs,
              iso9660), swap-based (memfs, mfs, tmpfs) filesystems and user (fuse*) filesystems.  Excluding the 'fuse' filesystem will exclude all fuse* filesystems.
       -w     block-width
              Set the print width for block values.  The default is eight.
       -v     Ignored.
       --version
              Display di's version and default format string.
       -W     inode-width
              Set the print width for inode values.  Default is seven.
       -x     exclude-fstype-list (compatibility: --exclude-type)
              Exclude  the  file  system  types  listed in exclude-fstyp-list.  The list is a comma separated list of file system types.  Multiple -x options may be specified.  If the 'fuse' filesystem type is excluded, all fuse*
              filesystems will be excluded.  e.g. -x nfs,tmpfs or -x nfs -x tmpfs.
       -X     level
              Set the program's debugging level to debug-level.
       -z     zone-name
              Display the filesystems for the specified zone.  The zone must be visible to the user.
       -Z     (alias for: -z all)
              Display the filesystems for all visible zones.
Format Strings
       The output of di may be specified via a format string.  This string may be given either via the -f command line option or as part of the DI_ARGS environment variable.  The format string may specify the following columns:
       m      Print the name of the mount point.
       M      Print the name of the mount point, at full length.  The mount point is formatted to the maximum width necessary for the longest mount point name.
       s      Print the file system name (special device or remote mount point).
       S      Print the file system name (special device or remote mount point), at full length.  The file system name is formatted to the maximum width necessary for the longest file system name.
       t      Print the file system type.
       T      Print the file system type at full length.  The file system type is formatted to the maximum width necessary for the longest file system type.
       Total Available
       b      Print the total number of megabytes on the file system.
       B      Print the total number of megabytes on the file system available for use by normal users.
       In Use
       u      Print the number of megabytes in use on the file system (actual number of megabytes used = total - free).
       c      Print the number of megabytes not available for use by normal users (total - available).
       Free
       f      Print the number of free (unused) megabytes on the file system.
       v      Print the number of megabytes available for use by normal users.
       Percentage Used
       p      Print the percentage of megabytes not available for use by normal users (number of megabytes not available for use / total disk space).
       1      Print the percentage of total megabytes in use (actual number of megabytes used / total disk space).
       2      Print the percentage of megabytes in use, BSD-style.  Represents the percentage of user-available space in use.  Note that values over 100% are possible (actual number of megabytes used /  disk  space  available  to
              non-root users).
       Percentage Free
       a      Print the percentage of megabytes available for use by normal users (number of megabytes available for use / total disk space).
       3      Print the percentage of total megabytes free (actual number of megabytes free / total disk space).
       Inodes
       i      Print the total number of file slots (inodes) that can be created on the file system.
       U      Print the number of file slots in use.
       F      Print the number of file slots available.
       P      Print the percentage of file slots in use.
       Mount Information
       I      Print the time the filesystem was mounted.  This column is not supported on all systems.
       O      Print the filesystem mount options.
       The default format string for di is smbuvpT.
       The default format string for mi is MSTIO.
       The format string may also contain any other character not listed above.  The character will be printed as is.  e.g. di -f 'mbuvp|iUFP' will print the character '|' between the disk usage and the file slot usage.  The com‐
       mand sequence:
              di -f 'mbuvp
              miUFP'
       will print two lines of data for each filesystem.
Examples
       Various df equivalent format strings for System V release 4 are:
              /usr/bin/df -v     di -P -f msbuf1
              /usr/bin/df -k     di -dk -f sbcvpm
              /usr/ucb/df        di -dk -f sbuv2m
       GNU df:
              df                 di -dk -f SbuvpM -w 10
              df -T              di -dk -f STbuvpM -w 10
       AIX df:
              df                 di -d 512 -f Sbf1UPM -w 10
              df -I              di -d 512 -f Sbuf1M
              df -I -M           di -d 512 -f SMbuf1 -w 10
       HP-UX bdf:
              bdf                di -d k -f Sbuv2M
              bdf -i             di -d k -f Sbuv2UFPM
       If you like your numbers to add up/calculate the percentage correctly, try one of the following format strings:
              di -f SMbuf1T
              di -f SMbcvpT
              di -f SMBuv2T
Environment Variables
       The DI_ARGS environment variable may be used to specify command line arguments.  e.g. If you always want gigabytes displayed, set DI_ARGS equal to "-dg".  Any command line arguments specified will override the DI_ARGS  en‐
       vironment variable.
       The DI_LOCALE_DIR environment variable may be used to specify the location of the di program's locale message files.
       The GNU df POSIXLY_CORRECT, and DF_BLOCK_SIZE and the BSD BLOCKSIZE environment variables are honored.
Note
       For filesystems that do not report available space (e.g. System V release 3), the number of available space is set to the free space.
WARNING
       Do not replace your system's df command with this program.  You will in all likelihood break your installation procedures.
See Also
       df(1), fstab(5), getmnt(2), getmntinfo(2), mnttab(4), mount(1M) statfs(2), statvfs(2)
Bugs
       Send bug reports to: brad.lanam.di_at_gmail.com
       Known Issues:
       di will probably not process a zettabyte or yottabyte sized filesystem properly due to overflow of a long long.
Website
       https://gentoo.com/di/
Author
       This program is Copyright 1994-2011 by Brad Lanam.
       Brad Lanam, Walnut Creek, CA (brad.lanam.di_at_gmail.com)
                                                                                                             17 Jan 2013                                                                                                        di(1)

How to: Quickly and Easily search a folder, partition or even computer for files in Microsoft Windows

When using Windows built-in search function, it can take ages to search a partition, it will take even longer if you want to search files across all partitions.

Everything is a free filename search software for Windows that can bring up your search results in seconds.

Everything
Everything
  • Small installation file
  • Clean and simple user interface
  • Quick file indexing
  • Quick searching
  • Quick startup
  • Minimal resource usage
  • Small database on disk
  • Real-time updating
  • Multilingual support
  • Has official portable version

Download Everything 1.4.1.935

Installer

64-bit Installer

Portable zip

64-bit Portable zip

Supported Languages

Language pack for Everything

Resource

Official website


Powerful Linux Interactive shell

fish (friendly interactive shell) is a smart and user-friendly command line shell for Linux, macOS, and the rest of the family.

Autosuggestions

Autosuggestion Thumbnail

fish suggests commands as you type based on history and completions, just like a web browser. Watch out, Netscape Navigator 4.0!

Glorious VGA Color

Colors Thumbnail

fish supports 24 bit true color, the state of the art in terminal technology. Behold the monospaced rainbow.

Sane Scripting

Scripting Thumbnail

fish is fully scriptable, and its syntax is simple, clean, and consistent. You’ll never write esac again.

Web Based configuration

Web Config Thumbnail

For those lucky few with a graphical computer, you can set your colors and view functions, variables, and history all from a web page.

Man Page Completions

Man Page Completions Thumbnail

Other shells support programmable completions, but only fish generates them automatically by parsing your installed man pages.

Works Out Of The Box

Works Out of the Box Thumbnail

fish will delight you with features like tab completions and syntax highlighting that just work, with nothing new to learn or configure.

fish can be installed easily on most Linux distros with their default package manager.

Linux

# Debian/Ubuntu/Kali Linux etc.
sudo apt install fish
 
# RHEL/CentOS/Fedora
sudo dns install fish
or, for older version
sudo yum install fish
 
# Archlinux
pacman -S fish
 
# gentoo Linux
emerge fish
 
# void-Linux
xbps-install fish-shell
 
# NixOS
nix-env -i fish
 
# Guix
guix package -i fish
 
# Solus
eopkg install fish
 
# Hombrew
brew install fish

BSD

# FreeBSD
pkg install fish
 
# OpenBSD
pkg_add fish

Windows

# Cygwin
fish is available in setup, in the Shells category.
 
# Windows Subsystem for Linux
sudo apt install fish
or
depend on the Linux distro you've chose, refer to the above "Linux" part to find correct command to use
 
# MSYS2
pacman -S fish

masOS

# Homebrew
brew install fish
 
# MacPorts
sudo port install fish
 
# Installer
https://github.com/fish-shell/fish-shell/releases/download/3.1.0/fish-3.1.0.pkg
 
10.6+: Installs to /usr/local/

Bonus

  • To use, type fish in the terminal then hit Enter key

To check fish version

echo $FISH_VERSION

HTML version help document

help

To switch default shell to fish

sudo chsh -s /usr/bin/fish

To switch back to default bash shell

sudo chsh -s /bin/bash

(If your default shell is zsh)

sudo chsh -s /usr/zsh

How to Fix: OneDrive Error … is unavailable, if the location is on….

The Error

When opening the File Explorer/This PC, following error pops up:

“C:\Users\%username%\Folder Name is unavailable. If the location is on this PC, make sure the device or drive is connected or the disc is inserted, and then try again. If the location is on a network, make sure you’re connected to the network or Internet, and the try again. If the location still can’t be found, it might have been moved or deleted.”

Usually this occurs after the reported folder has being deleted or moved.

The Fix

1 Exit OneDrive

2 Create the missing folder, e.g. if the missing folder mentioned in the error is “C\Users\Jack\Desktop”

Then create corresponding folders “C\Users\Jack\Desktop”

3 Start the OneDrive or OneDrive for business again, the error should be gone now


PHP MySQL Prepared Statements, data binding Example/Sample (With “CURRENT_TIMESTAMP” etc.)

(If you are not sure what is “->” in php or what is ‘ssi’ in bind_param Scroll to “Some basics” section first, then start from top of the page)

Database connection configuration

(Before starting, we need to create database connection string)

<?php
$servername = "localhost";
$username = "database_username";
$password = "database_password";
$dbname = "database_name";
// Create connection
$db_connect = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($db_connect->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
//echo "Connected successfully";
?>

Example 1 – Insert with prepared statement, data binding

<?php
//Prepare statement
$stmt = $db_connect->prepare("INSERT INTO Table_Name VALUES (?, ?, CURRENT_TIMESTAMP, ?)");
//Bind data
$stmt->bind_param('ssi', $First_Name, $Last_Name, $Age);
//Populate Data
$First_Name = 'Fred';
$Last_Name = 'Smith';
$Age = 50;
//Execute, 
if(!$stmt->execute()) {
	die('Error: ' . mysqli_error($db_connect));
}
$db_connect->close();
?>

Example 2 – Select with prepared statement, data binding

<?php
$stmt = $db_connect->prepare("SELECT Product FROM Table_Name WHERE ID = ?");
$stmt->bind_param('s',$ID);
$ID = 'ABC123';
$sql->execute();
$result = $stmt->get_result();
if($result->num_rows > 0) {
	while($row = $result->fetch_assoc()) {
		echo $row['Product'];
	}
}
mysqli_free_result($result);
$db_connect->close();
?>

Extra:

if($result->num_rows > 0) {
	while($row = $result->fetch_assoc()) {
		echo $row['Product'];
	}
}

Can be replaced by:

if($result->num_rows > 0) {
	while($row = mysqli_fetch_array($result)) {
		echo $row['Product'];
	}
}

What is fetch_assoc()? [5]

What is mysqli_fetch_array()? [6]

Example 3 – Update with prepared statement, data binding

<?php
$stmt = $db_connect->prepare("UPDATE Table_Name SET First_Name=?, Last_Name=?, Time=CURRENT_TIMESTAMP, Num_Books=? WHERE ID=?");
$stmt->bind_param('ssis', $First_Name, $Last_Name, $Num_Books, $ID);
$First_Name = 'Fred';
$Last_Name = 'Smith';
$Num_Books = 10;
$ID = 'ABC123';
if(!$stmt->execute()) {
	die('Error: ' . mysqli_error($db_connect));
}
$db_connect->close();
?>

Some basics

Object operator “->” [2,3,4]

e.g. “$db_connect->close();”

[2]
 
// Create a new instance of MyObject into $obj
$obj = new MyObject();
// Set a property in the $obj object called thisProperty
$obj->thisProperty = 'Fred';
// Call a method of the $obj object named getProperty
$obj->getProperty();
-> is like
. in Javascript
. in JAVA
. in RUBY
. in CloudFusion
. in Python

Type specification chars “i,d,s,b”

($stmt->bind_param(‘ssi’, $First_Name, $Last_Name, $Age);)

(To learn what is ‘ssi’ in Bind data part, see this “Type specification chars” table)

Type specification chars [1]

CharacterDescription
icorresponding variable has type integer
dcorresponding variable has type double
scorresponding variable has type string
bcorresponding variable is a blob and will be sent in packets

Resources

[1] php official document: mysqli_stmt::bind_param
[2] w3schools: PHP OOP – Classes and Objects
[4] php official document: Objects
[5] php official document: mysqli_result::fetch_assoc
[6] w3schools: PHP mysqli fetch_array() Function


Cross-site scripting (XSS) cheat sheet from PortSwigger

onactivate (IE)

<a id=x tabindex=1 onactivatealert(1)></a>

onafterprint (Chrome, Firefox, IE)

<body onafterprint=alert(a)>

etc.

The cheat sheet contains many vectors that can help you bypass WAFs and filters. You can select vectors by the event, tag or browser and a proof of concept is included for every vector. This cheat sheet is regularly updated

More can be found from official website

Official website

PDF version download


Simple/Quick List of Free Code Editors (Include free, open source)

(There are many commercial editors with trial period, they are not included in this list, only free or open source editors are listed)

  1. Aptana Studio (Windows, Linux, macOS)
  2. Atom.io (Windows, Linux, macOS)
  3. Crimson Editor (Windows)
  4. jEdit (Windows, Linux, macOS)
  5. Notepad++ (Windows)
  6. Programmer’s Notepad (Windows)
  7. PSPad (Windows)
  8. SCREEM (Linux) (HTML/Web)
  9. Visual Studio Code (Windows, Linux, macOS)

How to: Check/Change/Set/Modify Linux (Debian/Ubuntu/Kali Linux) date/time/timezone etc. (and Calculate past/future date/time) in Terminal

Check/Calculate time

Show current time

date
date
date

Calculate past/future time

date --date="1 day ago"
 
date --date="2 hours ago"
 
date --date="3 days"
 
date --date="2 hours"
Calculate dates/time
Calculate dates/time

timedatectl
 
timedatectl status
timedatectl
timedatectl
timedatectl status
timedatectl status

Show/Change timezone

Show timezone

timedatectl list-timezones

Set timezone

timedatectl set-timezone Africa/Abidjan

Change time by using “timedatectl”

(HH:MM:SS, in 24 hour format)

sudo timedatectl set-time 00:00:00
Use timedatectl set-time to change time
Use timedatectl set-time to change time

Change time by using “date”

(HH:MM:SS, in 24 hour format)

sudo date +%T -s "23:00:00"

(12 hour format)

sudo date +%T%p -s "2:00:00AM"
 
sudo date +%T%p -s "2:00:00PM"

Change date

Set the date and time to 03 Feb 2001, 01:00:00

sudo date --set="20010203 01:00:00"
 
sudo timedatectl set-time '2001-02-03 01:00:00'

Set date

sudo timedatectl set-time 2001-02-03
 
sudo date --date="2001-02-03"

Create custom date format (+)

sudo date +"Year : %Y Day : %d Month : %m"
 
# Output
Year : 2001 Day : 03 Month : 02
 
sudo +%D
 
# Output
02/03/01
 
sudo date +"%a %b %d %y"
 
# Output
Sat Feb 03 01
 
sudo date +"%A %B %d %Y"
 
# Output
Saturday February 03 2001
 
sudo date +"%A %B %d %Y %T"
 
# Output
Saturday February 03 2001 00:27:30
 
sudo date +"%A %B-%d-%Y %c"
 
# Output
Saturday February-03-2001 Sat 03 Feb 2001 00:28:17 EST

%D: Year/Month/Day format.

Show CMOS Time

sudo hwclock
hwclock
hwclock