Lninux:
sudo bash -c 'echo xxx.xxx.xxx.xxx yourAddressName>> /etc/hosts'
windows:
echo xxx.xxx.xxx.xxx yourAddressName>> C:\Windows\System32\drivers\etc\hosts
(首先要获取hosts文件的修改权限,即可在C:\Windows\System32\drivers\etc\hosts文件中添加 xxx.xxx.xxx.xxx yourAddressName)