This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Previous revision | ||
library:centos:commands [2019/11/06 23:36] |
library:centos:commands [2022/07/15 22:51] (current) lhaosen [防火墙] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Centos 常用命令 ====== | ||
+ | |||
+ | ===== 防火墙 ===== | ||
+ | |||
+ | CentOS 7.0默认使用的是firewall作为防火墙 | ||
+ | | ||
+ | 查看防火墙状态 | ||
+ | firewall-cmd --state | ||
+ | | ||
+ | 停止firewall | ||
+ | systemctl stop firewalld.service | ||
+ | | ||
+ | 禁止firewall开机启动 | ||
+ | systemctl disable firewalld.service | ||
+ | |||
+ | 中文支持 | ||
+ | export LC_ALL=zh_CN.GB2312; | ||
+ | 英文 | ||
+ | export LC_ALL=en_US.UTF-8; | ||
+ | |||
+ | sudo fdisk -l | ||
+ | | ||
+ | | ||
+ | useradd newuser | ||
+ | passwd newuser | ||
+ | useradd -d / | ||
+ | | ||
+ | adduser | ||
+ | | ||
+ | adduser newuser sudo | ||
+ | | ||
+ | | ||