| Command |
Description |
| ls -al |
Displays all information about files/directories. This includes displaying all hidden files as well |
| pwd |
Shows current directory path |
| mkdir directory-name |
Creates a directory |
| rm file-name |
Deletes file |
| cp file1 file2 |
Copies linux files here file1 to file2 |
| mv file1 file2 |
Moves files from one place to another/renames file1 to file2 |
| ln -s /path/to/file-name link-name |
Creates a symbolic link to file-name |
| touch file |
Creates empty file |
| cat file |
Prints the file content in terminal |
| more file |
Display the contents of file |
| head file |
Display the first 10 lines of file |
| tail file |
Outputs the last 10 lines of file |
| gpg -c file |
Encrypts file |
| cksum file |
View the checksum of the file |
| diff file1 file2 |
View the differences between contents of file1 and file2 |
| ln -s link file |
Create a soft link named link to the file |
| sort |
Sorts files in alphabetical order |
| uniq |
Compares adjacent lines in a file and removes/reports any duplicate lines |
| wc |
Counts number of words/lines |
| dir |
Lists the content of the directory |
| tee |
Command for chaining and redirection |
| tr |
Command for translating characters |
| rm -r directory-name |
Deletes directory recursively |
| cp -r dir1 dir2 |
Copies dir1 to dir2 creates dir2 if it doesn’t exist |
| tail -f file |
Outputs the contents of file as it grows starting with the last 10 lines |
| gpg file.gpg |
Decrypts file |
| rm -f file-name |
Forcefully removes file |
| rm -rf directory-name |
Forcefully removes directory recursively |