图中总结了日常工作中Linux必然用到的多个命令,
共10个大类,包括:
浏览和文件系统
pwd Print current working directory
ls List directory contents
cd [dir] Change directory
tree Visualize directory structure
find [path] -name [file] Find files by name
文件操作
touch [file] Create empty file
rm [file] Remove file
rm -r [dir] Remove directory recursively
cp [src] [dest] Copy files/directories
mv [src] [dest] Move/rename files
文件查看
cat [file]
less [file]
head -n 10 [file]
tail -n 10 [file]
tail -f [file]
文件权限
umask
stat [file] Display
chmod [mode] [file]
chown [user]:[group] [file]
进程管理
ps
top
htop
kill [PID]
killall [name]
网络
ip
ping [host]
curl [url]
wget [url]
netstat -tuln
磁盘和存储
df -h
du -sh [dir]
lsblk
fdisk -l
mount/umount
用户管理
whoami
id
adduser [name]
passwd [user]
groups [user]
系统信息
uname -a
uptime
free -h
dmesg
搜索和文本
grep '[pattern]' [file]
awk '(print $1)'
sed 's/old/new/g'
cut -d':' -f1
sort, uniq, wc -l
#linux
#编程
#计算机
#程序员
#软件