ifconfig -a ``` 修改網卡及ip等資訊 ``` vi /etc/network/interfaces ``` 底下的IP、閘道器、DNS...等請自行視情況修改 ``` auto lo eth0 iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 120.115.2.101 netmask 255.255.255.0 network 120.115.2.0 broadcast 120.115.2.255 gateway 120.115.2.253 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 163.26.1.1 dns-search tn.edu.tw iface eth0 inet6 static address 2001:288:7201:2::101 netmask 64 gateway 2001:288:7201:2::fffe ``` 2. 修改 /etc/hosts(一樣請自行修改IP及網址) ``` vi /etc/hosts ``` ``` 127.0.0.1 localhost 120.115.2.101 test.tn.edu.tw test # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters ``` 修改hostname ``` hostname test ``` 查詢主機版本以及hostname ``` uname -a ``` 重啟網路 ``` /etc/init.d/networking stop /etc/init.d/networking start ```
vi /etc/network/interfaces ``` 底下的IP、閘道器、DNS...等請自行視情況修改 ``` auto lo eth0 iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 120.115.2.101 netmask 255.255.255.0 network 120.115.2.0 broadcast 120.115.2.255 gateway 120.115.2.253 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 163.26.1.1 dns-search tn.edu.tw iface eth0 inet6 static address 2001:288:7201:2::101 netmask 64 gateway 2001:288:7201:2::fffe ``` 2. 修改 /etc/hosts(一樣請自行修改IP及網址) ``` vi /etc/hosts ``` ``` 127.0.0.1 localhost 120.115.2.101 test.tn.edu.tw test # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters ``` 修改hostname ``` hostname test ``` 查詢主機版本以及hostname ``` uname -a ``` 重啟網路 ``` /etc/init.d/networking stop /etc/init.d/networking start ```
auto lo eth0 iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 120.115.2.101 netmask 255.255.255.0 network 120.115.2.0 broadcast 120.115.2.255 gateway 120.115.2.253 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 163.26.1.1 dns-search tn.edu.tw iface eth0 inet6 static address 2001:288:7201:2::101 netmask 64 gateway 2001:288:7201:2::fffe ``` 2. 修改 /etc/hosts(一樣請自行修改IP及網址) ``` vi /etc/hosts ``` ``` 127.0.0.1 localhost 120.115.2.101 test.tn.edu.tw test # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters ``` 修改hostname ``` hostname test ``` 查詢主機版本以及hostname ``` uname -a ``` 重啟網路 ``` /etc/init.d/networking stop /etc/init.d/networking start ```
vi /etc/hosts ``` ``` 127.0.0.1 localhost 120.115.2.101 test.tn.edu.tw test # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters ``` 修改hostname ``` hostname test ``` 查詢主機版本以及hostname ``` uname -a ``` 重啟網路 ``` /etc/init.d/networking stop /etc/init.d/networking start ```
127.0.0.1 localhost 120.115.2.101 test.tn.edu.tw test # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters ``` 修改hostname ``` hostname test ``` 查詢主機版本以及hostname ``` uname -a ``` 重啟網路 ``` /etc/init.d/networking stop /etc/init.d/networking start ```
hostname test ``` 查詢主機版本以及hostname ``` uname -a ``` 重啟網路 ``` /etc/init.d/networking stop /etc/init.d/networking start ```
uname -a ``` 重啟網路 ``` /etc/init.d/networking stop /etc/init.d/networking start ```
/etc/init.d/networking stop /etc/init.d/networking start ```