快捷键
TAB
Ctrl+a
Ctrl+e
Ctrl+u
Ctrl+k
Ctrl+Shift+C
Ctrl+Shift+V
Ctrl+C
Ctrl+Z
文件路径
~
/
..
命令帮助
ls --help
cd
cd /
cd ..
cd ../../
cd ~
cd -
cd --
cd "test file"/
文件
mkdir file
mv file file1
rm file
rm -rf file
touch file
touch -d "2021-10-10 09:30:00" file
tail file
cp a b
sudo chmod 666 fileName
sudo chmod 777 fileName
stat file
cat fileName
cat -n fileName
cat fileName | grep 'ERROR'
df -h /var/lib/docker/
查找
which lsmod
find fil*
find -name fil*
locate fil
whereis ls
ssh
ssh root@192.168.80.130
cat /root/.ssh/known_hosts
scp -r test root@192.168.43.130:/home/test
scp -r root@192.168.43.130:/home/test /home/test
进程
ps -ef |grep 80
ps -ef |grep java
ps -ef |grep 2556
lsof -i:80
netstat -nlp|grep 80
kill -9 进程号
systemctl status network
systemctl start network
systemctl stop network
systemctl restart network
systemctl is-enabled network
systemctl enable network
systemctl disable network
systemctl list-unit-files
查看系统信息
free -h
lscpu
ifconfig
df -hl
cat messages* |grep usb|grep SerialNumber
dmesg |grep usb
uname -a
cat /etc/os-release
top
rpm安装
rpm -ivh 包名
rpm -Uvh 包名
rpm -qa
rpm -e 包名
rpm -e --nodeps 包名
rpm -qpR 包名
yum 安装(自动处理依赖)
yum -y install 包名
dpkg 安装
dpkg -i xxx.deb
tar
tar -zxvf test.tar.gz
tar -zcvf test.tar.gz ./
环境变量
env
echo envname
vim /etc/profile.d/my_env.sh
source /etc/profile.d/my_env.sh
网络
telnet ip port
netstat -ano
curl -i https://www.baidu.com
wget url
常用文件及文件目录
/etc/hosts
/etc/profile
/etc/profile.d
/bin
/sbin
/usr/bin
/usr/sbin