Linux-Basic command line operations, linux-basic operations
After installing Ubuntu, go to the system and display the Ubuntu interface, which is not much different from windows. Generally, the operating system includes the GUI and CLI. GUI is what we can see now. It is also common for windows to directly use drag, click, and other operations to run commands on the system. CLI then uses commands to directly operate on the system.
Right-click open Terminal to go to our command line interface. Here, you Open a new command line interface (Terminal) every time you Open Terminal, and each Terminal runs independently.
The basic operation commands are as follows:
The command contains three parts: 1 command 2 Option 3 parameter. Add an & Symbol after a command to run the command in the background.
There are two types of prompts: $ represents a common user # represents a root user, the highest permission
Ctrl + c: Force terminate the current command
Clear: clear the current page
The tab key can be used to automatically complete commands and file names, but cannot complete parameters. Click the tab to complete the commands that can be uniquely identified. Double-click the tab to search for all commands starting with a specified character. History: All historical commands.
!! : Repeat the previous command (same as the direction key) ! Character: Repeat the previous command starting with a 'characters' ! Num: Execute the command according to the sequence number of the history. !? Abc: the commands that contain ABC are repeated. ! -N: repeats the nth command.
Ctrl + r: after pressing ctrl + r, you can find the corresponding command by entering any character contained in the command. After esc, Press. To call the parameters of the previous command.Wildcard: * matches zero or multiple characters? Match any character [0-9] match a number range [ABC] match list any character [^ abc] match list other than character switching User: su-User Name: switch to the user under 'username'. If the user name is not added, switch to the root user. (Do not add-, add it as much as possible, and switch to the new terminal) sudo: run the command id with administrator permissions: display the current user information passwd: change the current user password
Manage background jobs: ctrl + z: Pause a program jobs: View background program bg + program run number: run a program to continue running fg + program run number in the background: run a program on the foreground