Linux Command

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

command to interact with computer using text

1. create new file: touch file_name

2. create folder/directory: mkdir directory_name

3. display the file content: cat file_name

4. move directory: cd directory_name

5. return to previous directory: cd ..

6. return to home directory: cd

7. edit file content: vi file_name


when edit a file: press 'i' for insert the update, then start typing
press 'esc' then 'w' to save the update
press 'esc' then 'q' to quit editting

8. view current working directory: pwd

9. display list of files in directory: ls or ls -a

10. move file: mv file_name target_directory

11. rename file: mv file_name new_file_name

12. remove/delete file:rm file_name

13. remove directory: rm -r directory_name

14. copy fil: cp filename new_filename

15. check file using regular expression, based on file_name pattern: grep
*file_name or grep file_name

16. change the persmission of file: chmod 777 file_name (this allow file to be
readable, writable, executable)

17. to install application: sudo apt install application_name (command can be check
on application website)

18. for update application: sudo apt-get update

19. to work as super admin: sudo su

#use 'Tab' for autocomplete file_name


#use help to check how to use command
#file can be open by just typing its name -> text.txt

You might also like