运维常用命令大集合


运维常用命令大集合

序言

在学习CentOS运维技术的时候,每次学习都会遇到特别多的命令,为了方便后期记忆学习,将这些命令整理在这里。

命令集合

alias #别名设置
authconfig
basename #基名
cat /etc/centos-release #print centos version info
cal #print calendar
cd  #change dir
chage
chfn
chsh
chpasswd
clock #print hardware clock
cp #copy command
clear ctrl+L #clear session command
date #print software clock
dd #convert and copy file
dirname #目录名
df #reporting file system disk space usage
du #estimated amount of disk space used by given files or directories
exit #quit session or logout
enable #enable builtin command
echo $SHELL #show which bash is used
file #print file type analyze the file type
finger #查询个人信息
getent #查看条目 shadow passwd group gshadow
grpck
groupadd
groupmod
groupdel
groups
groupmems
gpasswd
halt #stop operating but without power off
hash #check the command stored in cache and corresponding hit time
help #literal meaning
hexdump #display  file contents in hexadecimal, decimal, octal, or ascii
history #print command history
hostname #print hostname if you want to change hostname you should do it in /etc/hostname(centos7) /etc/hostname(centos6)
iconv #字符编码转换
info #find help info in this 
init 3 5 0 6 #set runlevel
id -u #print current user id
logout ctrl+d #literal meaning
ll #ll == ls -l
lsblk #list info on block device
ls #list file
lsof #列出被进程打开的文件
lscpu #print cpu info
lsb_release -a #check os info (centos6)
ln #构造硬链接
ln -s #构造软链接
localectl  #设置显示字符集和语言
man #find manual help
mandb #makewhatis 安装库
mii-tool [interfacename] #print info on interface eth0(centos6) ens33(centos7)
nmcli connection modify ens33 connection.autoconnect yes #set auto internet connect after booting
mv #移动文件
nano #file editor
newgrp #临时切换主组
newusers #批量创建用户 
ntpdate	#网络时间协议服务器ntp
poweroff #关机
ps #show process
pwd #print current working dir
pwck
reboot #重启
rename #重新命名文件
reset #重置当前窗口
rm #删除文件
rmdir #删除文件夹
runlevel #running mode
rpm -ivh #install software
rz #传输文件
screen #投屏软件,需要安装 rpm -ivh [安装光盘挂载点]
shutdown #关机
sleep #等待 sleep [n] 等待n秒
startx #use GUI
stat #可以看到文件的三个时间 ctime, atime, mtime
sosreport #红帽信息收集包
source==. #make config. file take effect
su #带-号完全切换,不带-号不完全切换
sz file #传输文件
tree #树型显示目录内容
type #show command type
tty #session
timedatectl #print system time info
touch #create file
unalias #cancel alias
uname -r #print kernel info
useradd
usermod
userdel
vipw
vigr
. .bashrc #make .bashrc file take effect
w #print terminal and user info
which #show the full path of command
whereis #locate the binary, source, and manual page files for a command
who #show who is log on
whoami #print effective userid
whatis #查看帮助
; #可以分割多条命令,在一行内执行多条命令

文章作者: 南航古惑仔
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 南航古惑仔 !
  目录