linux 第一节(基本命令)

RPM  红帽软件管理器,(源代码+安装规则打包)

YUM  软件仓库yum源,打包了大量的软件。

yum repolist all                          //列出所有仓库
yum list all                                  //列出仓库中所有软件包
yum info  软件包名称                //查看软件包信息
yum install 软件包名称             //安装软件包
yum reinstall 软件包名称           //重新安装软件包
yum update 软件包名称           //升级软件包
yum remove 软件包                 //移除软件包
yum clean all                           //清除所有仓库缓存
yum check-update                 //检查可更新的软件包
yum grouplist                       //查看系统中已经安装的软件包组
yum groupinstall 软件包组      //安装指定的软件包组
yum groupremove 软件包组     //移除指定的软件包组
yum groupinfo 软件包组           //查询指定的软件包组信息

 

 

systemctl start 服务名称     //开启服务

systemctl stop 服务名称     //关闭服务

systemctl restart 服务名称   //重启服务

systemctl status 服务名称     //查看服务

systemctl enable 服务名称  //加入到启动项

 

长格式:ls --list --all

短格式:ls -la

 

echo  trump

 

date  "+%Y-%m-%d"   //显示年月日

date "+%H:%M:%S"    //显示时分秒

date -s “2020-11-26 16:00:00”

hwclock --systohc  保存时间修改

 

ps aux | grep ntp    //查看NTP进程有没有启动

ps aux | grep chrony   //新版NTP时间服务

 

 

关机命令:

poweroff

shudown -s -t 3600

init 0

halt

 

ps -a  //查看进程所有信息

PS -u  //查看进程详细信息

R状态   //当前正在运行的服务

S中断   //等待用户服务的进程

D状态    //不可中断的休眠进程

Z状态        //zombie僵尸进程

T状态        //已 经被关闭的进程

 

top

NC  调整优化值

 

pidof ssh   //查看进程号

kill 1910  //结束进程

killall sshd   //结束所有进程

复习:安装linux系统

预习:第2章节

 

posted @ 2020-11-16 16:50  稻牛  阅读(51)  评论(0)    收藏  举报