Server CentOS CentOS 7: Install dhcpd and run DHCP server
lease: /var/lib/dhcpd/dhcpd.leases config: /etc/dhcp/dhcpd.conf option domain-name "calee.xyz"; option domain-name-servers 140.113.235.1, 1.1.1.1, 9.9.9.9, 8.8.8.8; default-lease-time 600; max-lease-time 7200; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.
fstab mount NTFS find here /etc/fstab
UUID=989CE0C49CE09E4E /home/calee/stg ntfs-3g defaults 0 0 Find UUID it’s a symbolic link to /dev/sd_ find here
ls -l /dev/disk/by-uuid 檢視分割磁碟區 sudo apt install gparted sudo gparted link ln -s TARGET(src) LINK_NAME(dst) # soft link
iptables 參考
iptables [-t table] command CHAIN [NUM] match criteria -j ACTION CHAIN -N: (new) new a chain -X: delete chain -F: flush all chain -Z: zero the pkg counter -P: policy of chain -E: rename rule -A: append rule -I: insert rule to number -R: replace -D: delete LIST -L: list -S: Specification -n: user number to show -v: verbose -x: show msg –line number: show line number DST-NAT sudo sysctl net.
Change default editor For global sudo update-alternatives --config editor # 然後選擇數字 For one user select-editor or in .bashrc
export EDITOR='vim' export VISUAL='vim' Add groups Change main group sudo groupadd mynewgroup # Add a new group usermod -g groupname username groups username Add secondary group sudo usermod -aG groupname username password policy find here find here find here vim /etc/pam.