alias some commands may be redefined

基本命令

uname uname -a
find witch distribution: cat /etc/os-release
cd; date; ls; pwd; whoami; whereis;

echo: echo $?
echo -e 'Hello\nWorld!'
echo *
echo *.sh

man, whatis, apropos
man -k

pipe, to combine commands

ls | wc -l

文件

查看

ls, find
df df -ah
du du -sh
ncdu, need to install

操作

mkdir rm cp mv

chmod

文本格式化

fold
fmt

常用工具

grep, sed, awk又称linux三剑客
head, tail
perl
wc
sh

系统管理,system

对应os里的各项资源来梳理结构并记忆

  • processors, CPU
  • Input/Output
  • Process Management
  • Memory
  • Devices
  • Timers
  • Interprocess Communication
  • Networking

0 服务,service

old:

service

new:

systemctl

1 TCP/IP网络

old: in net-tools

ifconfig
netstat
sudo netstat -tulpn

new: in package iproute2

ip ip addr show
ss

2 进程,process

ps
ps aux
ps -ef
top
htop, need to install

3 内存,memory

4 device

mount
/etc/fstab man 5 fstab
/dev/null