环境 Centos 7
第一步配置网卡
第二步使用yum下载图形化界面
第三部startx
开启图形
systemctl get-default ...
systemctl set-default ...
who #查看当前有哪些用户
useradd test
passwd testpwd
帮助手册
man
info
--help
more和less的区别
rm和rmdir的区别
cat -n
head -n
tail -n
通过 | 管道连接输出
完全复制-avf
which
stat
find
find / -mtime 3
find /etc -cnewer /etc/passwd
find /etc -type f -size +1M
tar
-cf
-zvf
-czf
zcat
-C dir
Vim
set number/nu
/root
yy : copy this line
p : paste and insert this line
dd : delete this line
yyp: insert a new empty line
:r filedir
:r!date
%s/{src}/{target}/g
:f filedir
~/.vimrc
set nu
set cindent
set bg=dark
Grep
grep daemon fileDir -n
grep ^g
gerp -v nologin
grep [0-9]
egrep 'daemon|Daemon'
cut -d : -f 3
cut -c33-36
包管理
rpm -qa
rpm -q packgeName
rpm -ivh packgeName
rpm -qi packgeName
/etc/yum.conf
/etc/yum.repos.d
yum clean all
yum makecache
yum check packName
yum install/remove/update/deplist
yum repolist all
yum check-update
文件系统管理
df -a
df -h /boot
df -i
du
du -a
fdisk -l
fdisk /dev/sdb
partprobe /dev/sdb
cfdisk /dev/sdb
pvcreate /dev/sdb6
vgcreate vg01 /dev/sdb5
lvcreate -L 100M -n lg01 vg01
lvdisplay
mkfs.ext4 /dev/sdb1 # 格式化
mkdir /usr/disk
mount /dev/sdb1 /usr/disk # 挂载
/etc/fstab # 自动挂载
mount -o /dev/sdb1 # 重载
quotacheck -cugv /usr/disk
edquota -u sommouns # 设置配额
quotaon -ugv /dev/sdb1
repquota /usr/disk
chmod -R 757 /usr/disk
dd if=/dev/zero of=file1 bs=1k count=16
quotaoff -ufv /dev/sdb1
用户管理
useradd -g stu12 sommouns # 初始化分组
groupadd stu12
passwd -l stu12 # lock
passwd -u stu12 # unlock
usermod -l targetName srcName
usermod -d dir -m username
文件权限
umask
chmod xxx xxxx
chown username:group filename
chmod u+x test1
setfacl -m user:mac2018:-w- pwd.sh
getfacl
网络
ifconfig
ifdown device
ping -c 3 www.baidu.com
route
route add -net 122.123.123.123 dev eno33
route del -net 122.123.123.123 dev eno33
ftp
get xxx
put xxx
exit
进程
ps -au
ps -ef
top -d 5
top -p 1122
pstree -p 2
ps -aux | grep atd
kill -9 5925
jobs -l
image.png
Job
at now +2minues
/bin/date
<EOT>
at -c 5
wc -l /test.js > /demo
atq
atrm 6
crontab -e
网友评论