bash命令補全
# 補全選項,需要安裝 bash-completion
yum install -y bash-completion
補全命令
補全選項
補全參數
linux 常用快捷鍵
Ctrl + a : 將光標跳轉到當前命令的行首(ahead)
Ctrl + e :將光標跳轉到當前命令的行尾(end)
Ctrl + w :按照空格刪除光標之前的命令(word)
Ctrl + c :終止當前的命令(cancel)
Ctrl + l :清屏(命令clear的功能)
Ctrl + r :查找執行的最近的一條命令(包含查找的字母)
Ctrl + d :退出當前的bash(只退出一個)exit logout(退出當前登陸的用戶)
Ctrl + z :把程序放在后台運行(windows上QQ最小化)
Ctrl + k :刪除當前光標到行尾的所有內容
Ctrl + u :刪除當前光標到行首的所有內容
Ctrl + 左右:快速移動光標
ESC + . :上一條命令,最后一個空格后面的內容顯示出來
Ctrl + s :鎖定當前命令行
Ctrl + q :解鎖當前命令行
# 查看歷史命令
[root@www ~]# history
# 清空歷史命令
[root@www ~]# history -c
# 指定刪除某一條歷史記錄
[root@www ~]# history -d 4
保存到: /root/.bash_history
# 歷史命令相關操作
!v: 執行你上一條,命令帶v的操作
!!:執行上一條命令
!17:執行歷史命令中,指定的操作