pwd# pring working directoryls # list files & foldersmkdir test# create directory called test
change working directory
Command
Description
cd
Navigate into directory
cd ..
Go up one level
cd -
Go to previous working directory
cd ~
Change directory to home directory
cd /
Change directory to root directory
cdtest# navigate into test directorycd .. # go up to one levelcd - # go to previous working directorycd ~ # change directory to home directorycd / # change directory to root directoryrmdir test# remove empty directory, note that the folder must be empty
list the file and folders
Command
Description
ls
List directory contents
ls -l
List files one per line
ls -a
List all files, including hidden files
ls - la
Display permission, ownership, size & modification date
ls -lh
Long format with size displayed in human readable units