Basic

From AlphaBook
Revision as of 13:49, 3 December 2018 by Admin (talk | contribs)
Jump to: navigation, search

Partition

  • /boot
  • /
  • swap

Hostname

  • hostname
  • hostnamectl set-hostname Linux001

Network

  • vi /etc/sysconfig/network-scripts/ifcfg-ens32
  • BOOTPROTO=static
  • ONBOOT=yes
  • IPADDR=192.168.200.10
  • NETMASK=255.255.255.0
  • GATEWAY=192.168.200.1
  • systemctl restart network

Service

  • systemctl status ssh
  • systemctl start ssh
  • systemctl stop ssh
  • systemctl restart ssh
  • systemctl reload ssh
  • systemctl enable ssh
  • systemctl disable ssh
  • systemctl is-enabled ssh
  • systemctl is-active ssh
  • systemctl show ssh

Firewall

  • systemctl status firewalld
  • firewall-cmd --get-default-zone
  • firewall-cmd --set-default-zone=internal
  • firewall-cmd --list-service
    • ssh dhcpv6-client http https ftp samba samba-client smtp tftp tftp-client dns
  • firewall-cmd --permanent --add-service=http
  • firewall-cmd --reload
  • firewall-cmd --list-all

SELinux

  • sestatus
  • getenforce
  • setenforce
  • vi /etc/selinux/config

Basic Ubuntu