基础命令

  1. $ uname
  2. Linux
  3. $ uname -a
  4. Linux localhost 3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  5. $ cat /proc/version
  6. Linux version 3.10.0-1062.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Wed Aug 7 18:08:02 UTC 2019

常用

关闭防火墙

  1. systemctl stop firewalld
  2. systemctl disable firewalld

etc/hosts

hosts文件是Linux系统中一个负责IP地址与域名快速解析的文件,以ASCII格式保存在“/etc”目录下,文件名为“hosts”

  1. 第一部份:网络IP地址;第二部份:主机名或域名;第三部份:主机名别名;
    127.0.0.1 localhost.localdomain localhost
    192.168.1.100 linmu100.com linmu100
    192.168.1.120 ftpserver ftp120
    

systemctl