Linux commands are basically simple to use

1.Ctrl+Alt+t, Open the command line terminal, press again to open another
2.exit, Then press Enter to close the command line terminal
Insert picture description here

  1. pwd, Print the path of the current state
    Insert picture description here

  2. lsTo view the files in the current directory,The blue one indicates a directory, which is a folderWhite indicates normal files, Because Linux does not have a graphical interface in many cases, so it uses color to distinguish file types
    Insert picture description here

  3. ls -l(Add a space in the middle), look at the detailed information of the file, the file can show the detailed information such as creation time in the form of a list. The one beginning with d in the front indicates a folder, and the beginning with-is an ordinary file
    Insert picture description here

  4. Ctrl+l, Hide the historical information of the previous command line terminal and give a new screen

  5. cd xxx, Open the xxx folder. You can also use cd xx to go back to the previous directory, orcd …
    Insert picture description hereInsert picture description here

  6. touch xxx,Create a file
    Insert picture description here

  7. mkdir xxx, Create folder
    Insert picture description here

  8. rm xxxDelete ordinary files. Why can't I delete D1?
    Insert picture description here
    Insert picture description here

  9. rm -r xxxYou can directly rm to delete ordinary files, and add -r to delete folders
    Insert picture description here

  10. Root directory (public area, generally cannot be used) ->Home directory->In your own world, store everything in your own home directory
    Insert picture description here

Insert picture description here
Insert picture description here
13. cd, Go home automatically (home directory), no longer
Insert picture description here
14.sudo xxxxxxxx,Super user administrator rights, can be used in public areas
Insert picture description here
15.Tap automatic completion. There is Desktop in this directory. I just type cd De and press Tap, and it will be automatically completed. Or cd M+Tap, can also automatically complete
Insert picture description here
16. Record history command function, up and down arrows on the keyboard, adjustable.
17.dpkg -lTo view all software installed under Ubuntu
Insert picture description here
18.dpkg -s xxx, Check if a specific software is installed
Insert picture description here
19.sudo apt-get remove xxx, Uninstall a certain software
Insert picture description here
20.sudo apt-get install xxx, Install a certain software
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_43722052/article/details/114013880