Create User

su root
useradd foo
pass foo

# Add user to the sudoers group
usermod -aG wheel foo
su - foo
whoami

Package Management

# apt is a frontend to dpkg
dpkg --list {name}
dpkg --remove {name}
apt remove {name}

Linux File System

cat /etc/passwd | grep foo
echo $0
ls -l /etc/ | less

touch myfile-1
touch myfile-2
# brace expansion
rm ~/{myfile-1, myfile-2}
printenv | grep PATH
echo $PATH
# Soft Link
# ln -s [original_filename] [link_filename]
touch a.txt
ln -s a.txt b.txt
echo "aaa" >> a.txt
cat a.txt
cat b.txt
# return the name of the file the symbolic link points to
readlink b.txt

# Hard Link
# different virtual file that points to the original file
# they are physically the same
touch a.txt
ln a.txt b.txt
echo "aaa" >> a.txt
cat a.txt
cat b.txt
readlink b.txt

# more detailed info-name,size,type
stat a.txt
# report type of a file
file a.txt