Linux basic commands

Print to screen

echo Hi
List files and folders in current directory
ls
Change directory
cd /tmp
Print working directory
pwd
Make directory
mkdir /tmp/new_dir
Make directory hierarchy
mkdir -p /tmp/new_dir/sobfolder
Remove a directory with all contents
rm -r /tmp/new_dir
Copy directory to another location recursively
cp -r /etc /tmp/etc_backup
Run multiple commands - separate them by semicolon (;):
cd /tmp; mkdir new_dir; pwd
Create an empty file
touch myfile
Add contents to file
cat > myfile
add content and press Ctrl+D at the end

View the contents of the file
cat myfile
Copy file
cp /etc/hosts /tmp/hosts_backup
Move/Rename a file
mv /tmp/hosts_backup /tmp/hosts_bkp
Delete a file
rm /tmp/hosts_bkp