Linux 远程连接虚拟机

一、主机名和列表 1.默认的主机名是localhost.localhostDomain 2.修改主机名的两种方式: (1)hostnamectl set-hostname 新主机名 (2)vi /etc/hostname 在其中把【主机名】改成【新主机名】(需要重启 才能生效) 3.主机列表 vi /etc/hosts 在其中加上:主机Ip地址:主机名 4. ssh 用户名@主机名/ip地主:连接
相关文章
相关标签/搜索