Add change hostname script #3

Merged
DocRock3r merged 4 commits from wip into main 2025-04-23 19:47:46 +00:00
Showing only changes of commit ff8001d297 - Show all commits

View File

@@ -7,7 +7,7 @@ old_host=$(hostname)
#make backups for hostname and hosts files #make backups for hostname and hosts files
cp /etc/hostname /etc/hostname.bk cp /etc/hostname /etc/hostname.bk
cd /etc/hosts /etc/hosts.bk cp /etc/hosts /etc/hosts.bk
#ask user for new host name and set it as value for new_host #ask user for new host name and set it as value for new_host
printf "%s\n" "Hostname must be between 1-63 characters long" printf "%s\n" "Hostname must be between 1-63 characters long"