Alias alias permanent
1. Open a new file directory cd /etc/profile.d my_alias.sh
2.my_alias.sh which added alias p = 'poweroff -h' alias r = 'reboot'
3. After saving, source /etc/profile.d/my_alias.sh
NAT mode virtual machine, static IP configuration, and A, B, to achieve free access secret
1. ip subnet read: 192.168.100.221
2. Switch the root user to modify the configuration file, centos A ip with 192.168.153.221, reboot card
Modify the configuration file: vi / etc / sysconfig / network -scripts / ifcfg-ens33
restart card: systemctl restart network.service
3. Start two virtual network adapter, network connectivity testing the ping www.baidu.com
Command window to restart the network card: ifup ens33
Remote-free access secret
1. The key generating centosA and B, shell input: ssh-keygen -t rsa been press Enter
2. The public key is sent to another server
ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
3. Review the authorized_keys file
4.ssh connection 192.168.174.133, avoid close a successful login