Adding debian specific Static IP address changes, and hostname updates

This commit is contained in:
2025-12-07 14:45:56 +13:00
parent 03fe3c8ab9
commit 37ced0534d
2 changed files with 179 additions and 0 deletions

53
Networking/Hostname.md Normal file
View File

@@ -0,0 +1,53 @@
**Setup Hostname**
Log into the hostname (ssh)
Run the following command
```
sudo hostnamectl set-hostname NewHostName
```
Also need to update the hosts name
```
sudo vi /etc/hosts
```
***Example of old host file***
```
127.0.0.1 localhost
127.0.1.1 old-hostname.vocus.co.nz old-hostname
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
```
***Example of updated host***
```
127.0.0.1 localhost
127.0.1.1 New-hostname.vocus.co.nz New-hostname
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
```
While hostnamectl typically applies the changes immediately, some services or applications might still be referencing the old hostname. You can restart network services or reboot the system for a complete refresh, although often it's not strictly necessary.
To restart network services:
```
sudo systemctl restart network-online.target
```
or just reboot
```
Sudo Reboot
```