码迷,mamicode.com
首页 > 其他好文 > 详细

ssh服务远程管理主机

时间:2018-04-15 18:07:12      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:编辑器   开机   device   connect   sys   参数配置   cli   图形   mct   

一、管理服务命令systemctl

1)systemctl管理服务的启动、重启、停止、重载、查看状态命令如下:

sysvinit命令        systemctl命令          作用

service foot start          systemctl start foot.service     启动服务

service foot restart       systemctl restar foot.service  重启服务

service foot stop      systemctl stop foot.service    重启服务

service foot reload        systemctl reload foot.service   重新加载配置文件

service foot status      systemctl status foot.service    查看服务状态

2)systemctl设置服务开机启动、不启动、查看各级别下服务状态

sysvinit命令        systemctl命令           作用

chkconfig foot on       systemctl enable foot.service  开机自动启动

chkconfig foot off       systemctl disable foot.service  开机不自动启动

chkconfig foo        systemctl is-enabled foot.service  查看特定服务是否为开机自动启动

chkconfig --list         systemctl list-unit-files --type=service  查看各级别下服务的启动与禁用状态

二、监视资源与管理进程

1)ps命令查看系统中进程的状态,格式为:ps -[参数]

-a 显示所有信息

2)top命令用于监视进程的活动与系统负载

3)pidof命令用于查看系统某个特定进程的PID值,格式为:pidof [参数]  [程序名称]

4)kill命令用于终止某个特定PID号的进程,格式为:kill [进程PID号]

5)killall命令用于终止某个特定PID号的所有进程

三、网卡参数配置

1)使用vi 、vim编辑器配置网卡

2)使用nmtui管理工具进入图形化界面配置网卡参数

3)nmcli命令查看网卡信息,例:nmcli connection show查看网络连接信息,nmcli device stattus 查看网卡连接状态

添加会话:nmcli connection add con-name company type ethernet ifname ens33

启用公司会话:nmcli connection up conpany

查看会话状态:nmcli connection show

ssh服务远程管理主机

标签:编辑器   开机   device   connect   sys   参数配置   cli   图形   mct   

原文地址:https://www.cnblogs.com/weiyuncai/p/8711815.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!