xshell 登录方式
ssh root@11.22.33.44
命令工具
hostname toking 主机名
hostname + 新名字 修改主机名
vim /etc/hostname 文件里修改主机名
centos 7目录结构
/bin User Binaries
/sbin System Binaries
/etc Configuration Files
/dev Device Files
/proc process information
/var variable files
/tmp temporary files
/usr user programs
/home home directories
/boot boot loader files
/lib system libraries
/opt optional add-on apps
/mnt mount directory
/media removable devices
/srv service data
centos7操作系统 时区调整
timedatectl
date 查看时间
date -R 查看时区
timedatectl 查看时间
timedatectl set-timezone Asia/Shanghai 设置时区
timedatectl set-local-rtc 1 修改主板时间
timedatectl list-timezones 列出所有 时区
centos7 操作系统网卡命名
ifconfig 展示ip地址信息
ip 展示ip地址信息
ip a
ip命令使用场景
1.查看修改ip地址信息
2.操作控制网络接口
3.配置路由信息
4.策略路由
centos7 自动补全 -命令,文件名,参数补全 按一下或两下tab
yum install bash-completion 需要安装这个包才支持
centos7 系统内存
内存用途说明:
1.应用程序,
2.buffers,存储速度不同步的设备或优先级不同的设备之间传输数据的缓存区域
3.cache,cpu读取数据文件缓存缓存的一个存储缓存区域。
4.未使用
1.当程序需要时,可以回收cache和buffer来提供给应用程序使用
什么时候操作系统内存有问题?
1.操作系统内存耗尽,将出发啊OOM机制,导致系统自动重启
2.不要期待swap能解决内存使用问题
3.使用到60%-80%需要重视
查看内存方式
top
如果是多核的 按1切换
shift+m 内存使用量按大到小排序
shift+p cpu进程使用量
free 查看内存使用率
free -m 以M为单位查看内存使用量
centos7 中端口状态查看命令ss
ss命令比netstat执行快
netstat -luntp
netstat -an|grep 22
网友评论