Common commands of Linux system (2) Permanently modify the host name, view the status of the host name, set the system language, view the system startup time, and turn off the firewall

1. Permanently modify the hostname

hostnamectl set-hostname new name

Insert picture description here
Restart the system:
Insert picture description here

2. View the status of the hostname

hostnamectl status
Insert picture description here

3. Set the system language

View the language localectl status used by the current system

Set the system language to Chinese (you can use this command when you select the wrong language when installing the virtual machine):

localectl set-locale LANG=zh_CN.utf8
Insert picture description here

4. View the system startup time

systemd-analyze

Insert picture description here

5. Turn off the firewall

5.1 Temporary closure

systemctl stop firewalld.service
setenforce 0
Insert picture description here

5.2 Permanent closure

vim /etc/sysconfig/selinux
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_51613313/article/details/110433403