.thaleous
08/21/2024, 1:39 PMAnswer Overflow
08/21/2024, 1:39 PM.thaleous
08/21/2024, 1:42 PM.thaleous
08/21/2024, 1:44 PM#!/bin/bash
# Define the new hostname
NEW_HOSTNAME="my-os"
# Update /etc/hostname with the new hostname
echo "$NEW_HOSTNAME" > /etc/hostname
# Update /etc/hosts to reflect the new hostname
sed -i "s/localhost[ \t]*localhost/localhost $NEW_HOSTNAME/" /etc/hosts
this is the change-hostname.sh.thaleous
08/21/2024, 2:08 PM#!/bin/bash
echo "my-os" > /etc/hostname
hostnamectl set-hostname meme-osfiftydinar
08/21/2024, 2:17 PMhostnamectl is sufficientfiftydinar
08/21/2024, 2:17 PM.thaleous
08/21/2024, 2:18 PMfiftydinar
08/21/2024, 2:18 PM.thaleous
08/21/2024, 2:18 PM.thaleous
08/21/2024, 2:18 PMfiftydinar
08/21/2024, 2:18 PMfiftydinar
08/21/2024, 2:18 PM.thaleous
08/21/2024, 2:19 PM.thaleous
08/21/2024, 2:19 PMfiftydinar
08/21/2024, 2:19 PM.thaleous
08/21/2024, 2:19 PMfiftydinar
08/21/2024, 2:20 PM.thaleous
08/21/2024, 2:20 PMfiftydinar
08/21/2024, 2:20 PM/usr/etc/hostname instead of /etc/.thaleous
08/21/2024, 2:20 PM.thaleous
08/21/2024, 2:21 PMfiftydinar
08/21/2024, 2:22 PM/etc/hosts in build-time, but adding the file in /usr/etc/hosts worksfiftydinar
08/21/2024, 2:22 PM.thaleous
08/21/2024, 2:25 PMfiftydinar
08/21/2024, 2:25 PM.thaleous
08/21/2024, 2:25 PM.thaleous
08/21/2024, 2:25 PMfiftydinar
08/21/2024, 2:25 PMfiftydinar
08/21/2024, 2:25 PM.thaleous
08/21/2024, 2:25 PMfiftydinar
08/21/2024, 2:26 PMfiftydinar
08/21/2024, 2:26 PM.thaleous
08/21/2024, 2:26 PMfiftydinar
08/21/2024, 2:26 PM/usr/bin/fiftydinar
08/21/2024, 2:27 PM.thaleous
08/21/2024, 2:28 PMfiftydinar
08/21/2024, 2:29 PM.thaleous
08/21/2024, 2:30 PMxyny
08/23/2024, 12:00 PM.thaleous
08/23/2024, 2:47 PM.thaleous
08/23/2024, 2:48 PMxyny
08/23/2024, 7:23 PM.thaleous
08/23/2024, 9:08 PM