linux operation and maintenance learning
1. Shortcut keys
- Tab
- ctrl + a jump to the beginning of the string
- ctrl + e jump to the end of the string
- ctrl + b cursor forward
- ctrl + f move the cursor back
- ctrl + k cut the character after the cursor
- ctrl + u cut the character before the cursor
- ctrl + l clear screen
- ctrl + insert copy command line
- shift + insert paste
- ctrl + r search used commands
- ctrl + z Pause command bg to run jobs in the background to view the running status
- ctrl + s lock screen
- ctrl + q to unlock
- esc +. Get the text after the previous command
- ! + Letter query the most recently used command
- !! Execute the last command
2. Common commands
- Basic help command command + --help
- Help command man + command
- Restart command shutdown -r now reboot
- Shutdown command shutdown -h now half poweroff
- New file touch file name`
touch a b c d
touch {
1..5}.txt
rm -rf 文件/目录
- Show file path pwd
- Jump command cd
cd - 上一次目录
cd ..上一级目录
cd . 当前目录
cd ~ 家目录
mkdir a/b/c -p 递归新建目录
- Show directory tree column tree
tree -L n 显示n层目录
tree -d 只显示目录