Basic Linux Commands

Basic Linux Commands

·

2 min read

Files & Navigation

ls - directory listing
It will list all files/folders on the current dir

ls - l - Formatted listing
Displays the contents of the current directory in a long listing format, one per line

ls - la - Formatted listing including hidden files

List files including hidden files, list files or directories including hidden files or directories

cd - Change Directory

Is used to change the current working directory

cd .. - change to the parent directory

pwd - shows the current directory

mkdir - The mkdir stands for 'make directory'.

rm file - delete the file

rm -r dir - Delete Directory

rm -rf dir - removes the directory

cp file1 file2 - copy the file1 contents to file2

mv - rename the files

touch file - create the file

cat filename - output contents of the file

cat > filename - Write standard input into the file

cat >> file name - Append standard input into the file

tail -f file name - output contents of the file as it grows