Linux基础命令列表

命令列表

A
alias 
B
bc
basename 
bash -n -x 
C
clock 
cal 
cd 
clear 
cat /etc/motd /etc/issue -A
cp 
chown 
chgrp 
chmod 
chattr +i +a 
chpasswd 
chage 
chsh 
chfn 
cut 
curl
D
date
dnf 
df -i 
dd if=/dev/zero of=/data/bigfile bs=1M count=100
dirname 
diff 
declare -i -r -x 
dmesg 
E
echo $PS1 $SHELL
export 
exit 
enable 
egrep = grep -E 
env
export
expr 
F
file
free  
finger 
fgrep = grep -F 不支持正则表达式
false 
G
gedit 
getent passwd | shadow |group| gshadow name 
groupadd
groupmod
groupdel 
getfacl 
gpasswd
groups
groupmems 
grep 
H
hash
halt 
hostname  
hostnamectl 
hexdump
history  
help 内部命令
head 

I
init 0 3 5 6
info ls 
iconv 
id 
J
K
L
lscpu 
logout
lsblk 
lsof 
ln 
lsattr 
less
let  
M
mv 
man 
mandb 
makewhatis 
mkdir -p
mail  
more 

N
nano /etc/motd 
newgrp 
nl cat -b 
O
od 
P
poweroff 
ps aux
passwd 
pstree 
paste 
patch 
prinf 
ping 
printenv 
Q
R
rm 
rmdir 
reboot
runlevel  
rename
readonly 
rev 
S
seq -s+ 100 |bc 
set -C | +C -u -e -o 
shred 
sudo -i
su - -c cmd 
screen
shutdown 
sleep 
sudo -i 
systemctl start autofs 
source =  . 
sosreport  
stat
ss  
ssh 
setfacl 
sort 
T
tr
tty 
tmux 
type 
touch 
tree 
tail
tee 
tar 
tac 
true 
U
uptime 
unalias
useradd
usermod
userdel 
umask 
uniq
unset  
V
vi 
vim 
W
who   who am i 
whoami
which
whereis
whatis 
wc -l 
X
xxd 
Y
yum 
Z

设备名第二个分区mount挂载 到 c:\part2 挂载点mount point

设备 ----> mount ----> mount point

分区表示法:

/dev/sda1 mount /boot

swap 2G 4G 1G 2G

200G 2G
/ 100G
/boot 1G
/data 50G
swap 4G

``
$()
''
""

{}

1 whatis CMD mandb
2 type CMD
3 如果内部:help CMD ; man bash
4 如果外部:CMD --help | -h

yum -y install autofs

systemctl enable --now autofs
或者
systemctl start autofs
systemctl enable autofs

/etc/sysconfig/network-scripts/
文件(包括目录)
所在目录dirname:/etc/sysconfig/
文件名basename:network-scripts

/etc/sysconfig/network-scripts/ifcfg-eth0
dirname:/etc/sysconfig/network-scripts/
basename:ifcfg-eth0

作业:
1 将rm定义成mv的别名,实现rm file = mv file /tmp

1> file 标准输出
2> file 标准错误
&> file 标准输出和错误
< file 标准输入
2>&1 将标准错误重定向为标准输出
1>&2

<<EOF 多行重定向
xxx
yyy
EOF
CMD1 | CMD2 | ... 将CMD1的标准输出作为CMD2的标准输入

su
umask
chown
chgrp
chmod
chattr +i +a
setfacl
getfacl
vi 三种模式:命令,插入,扩展命令ssdafsadfadasdfasdasdfasdf

修改网卡名称,恢复传统的网卡命名

[root@centos8 ~]#vim /etc/default/grub
GRUB_CMDLINE_LINUX="crashkernel=auto resume=UUID=eebe3bc7-6d52-4ad9-86aa-916f1a123fd4 rhgb quiet net.ifnames=0"
[root@centos8 ~]#grub2-mkconfig -o /boot/grub2/grub.cfg
[root@centos8 ~]#reboot

重点:
1、正则表达式,扩展正则表达式
2、脚本基础

上一篇:Autofs


下一篇:程序编译安装和磁盘