File && Directory
# show all file info
ls -lah
# show current path
pwd
# show current directory and subdirectory in tree
tree
Privilege
chmod
chown
Swap
make and add swap
sudo fallocate -l 2G /swapfile
# sudo dd if=/dev/zero of=/swapfile bs=1024 count=2097152
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
# set as default swap
sudo vim /etc/fstab
# add line
# /swapfile swap swap defaults 0 0
# get status
sudo free -h
change swappiness percent
# change swappiness percent
cat /proc/sys/vm/swappiness
vim /etc/sysctl.conf
# edit
# vm.swappiness=10
remove swap
# remove swap
sudo swapoff -v /swapfile
sudo rm /swapfile