• 欧美亚VPS推荐网,同时启用新域名 eaavps.com

    Europe:欧洲

    America:美国

    Asia:亚洲

    VPS:Virtual Private Server 虚拟专用服务器

  • 搬瓦工 年付49.99美元/年的 CN2 GIA-E限量方案,值得你拥有,要买的速度。估计很快就会被卖完。

    https://www.eaavps.com/788.html

  • :grin:

    感谢大家支持,今天是个好节日,祝大家节日快乐,玩得开心!

Centos 常用的命令

折腾笔记 涛哥 4年前 (2020-07-02) 968次浏览 已收录 0个评论 扫描二维码
文章目录[隐藏]

firewalld防火墙

查看防火墙状态

systemctl status firewalld.service

或者

firewall-cmd --state

关闭运行的防火墙

systemctl stop firewalld.service

永久关闭防火墙禁止防火墙服务

systemctl disable firewalld.service

iptables

安装 iptables service

yum -y install iptables-services

设置防火墙开机启动

systemctl enable iptables.service

重启防火墙使配置生效

systemctl restart iptables.service

清除iptables防火墙规则

iptables -F

检查iptables防火墙状态

service iptables status

开启转发功能

echo -e "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
sysctl -p

安装 screen

新建窗口运行程序

yum install screen

update centos系统

yum -y update

查看centos系统的版本

cat /etc/redhat-release

查看centos内核版本

uname -a

查看系统时间

date

更改系统时间时区

timedatectl set-timezone Asia/Shanghai

更换源

yum install epel-release

获取外网IP

curl icanhazip.com
curl cip.cc    #带归属地
curl ip.sb
curl ipinfo.io  #带归属地

获取网卡IP

ip addr show

欧美亚VPS推荐网eaavps.com , 版权所有丨如未注明 , 均为原创丨
转载请注明原文链接:Centos 常用的命令
本站的文章和资源来自互联网或者站长的原创。
如果有侵犯版权的资源请尽快联系站长,我们会在24h内删除有争议的资源。
欢迎加入QQ群:875883962 | 一起研究讨论交流心得,对发广告、潜水等会清理出群。
文明交流、拒绝非法信息。
喜欢 (0)
[pcghost@163.com]
分享 (0)
涛哥
关于作者:
不是从来就有,也不会永远存在。

您必须 登录 才能发表评论!