Hi All,
Below is the list of basic linux commands---
---------------------------------------------------------------------------
1. pwd ------------- present working directory - path of current folder --------------- pwd (enter)
2. ls -------------- To list content of current folder -------------------------------- ls (enter)
2a. ls l ---------- To list vertically detailed information---------------------------- ls -l (enter)
2b. ls al --------- To list vertically with hidden files ------------------------------ ls -al (enter)
2c. ls *.txt ------- To list all text files ------------------------------------------- ls *.txt (enter)
3. cd -------------- change directory/folder ------------------------------------------ cd foldername (enter)
4. cd .. ----------- To go back one folder -------------------------------------------- cd .. (enter)
5. mkdir ----------- To make new directory -------------------------------------------- mkdir folderName (enter)
5a. mkdir p a/b/c -- To make nested folders ------------------------------------------- mkdir -p a/b/c/ (enter)
6. touch ----------- To create a new empty file --------------------------------------- touch fileName (enter)
7. vi -------------- To create/edit/write a file -------------------------------------- vi fileName (enter)
7a. i -------------- insert content to file ------------------------------------------- press i
7b. Start writing content
7c. esc ------------ To come out of insert mode --------------------------------------- press Esc button
7d. :q ------------- To quit file without writing anything ---------------------------- :q (enter)
7e. :wq ------------ Write, save and quit from file ----------------------------------- :wq (enter)
8. cat ------------- To check the content of file ------------------------------------- cat fileName (enter)
8a. cat ------------ To read multiple files ------------------------------------------- cat file1 file2 file3 (enter)
8b. cat n -------- print file with line numbers -------------------------------------- cat -n file1 (enter)
8c. cat | wc l ---- count the number of lines in a file ------------------------------- cat file1 | wc -l (enter)
9. rm -------------- To remove file --------------------------------------------------- rm fileName (enter)
9a. rm rf --------- To remove folder with all contents in it -------------------------- rm -rf foldername (enter)
9b. rmdir ---------- To remove folder (Empty folder)----------------------------------- rmdir folderanme (enter)
10. sudo su -------- To gain root access ---------------------------------------------- sudo su (enter)
11. clear ---------- To clear screen -------------------------------------------------- clear (enter)
12. history -------- To check history of commands ------------------------------------- history (enter)
12a. history | tail - show the last 10 lines of history---------------------------------- history | tail (enter)
----------------------------------------------------------------------------------------------------------------------------------------------
For More Information:
Please write us at: [email protected]
====== If you would like to donate and give support to our Channel, write a mail to us.
Thanks For giving Your Valuable time.
Regards,
ComputeOnCloud Team