centos 基础操作

开启、停止、重启服务

service xxx start 
service xxx stop
service xxx restart

服务进程:

ssh:sshd

网卡:network

查看可用的yum安装包 yum list | grep xxx

grep -v 忽略内容

head -2 test.txt 显示前2行

sed -e 'oldboy/d' test.txt 输出时不显示指定内容   grep -v oldboy test.txt

sed -n oldboy/p text.txt 只输出指定内容       grep oldboy test.txt

原文地址:https://www.cnblogs.com/xiongwei89/p/3665576.html