To change the hostname of your system:
Edit the hostname file:
sudo nano /etc/hostname Replace the existing name with your new hostname.
Edit the hosts file:
sudo nano /etc/hosts Update the line that starts with 127.0.1.1 to reflect the new hostname.
Apply the changes:
sudo systemctl restart systemd-logind.service To rename a user:
Rename the user:
sudo usermod -l new_username old_username Rename the home directory (if needed):
sudo usermod -d /homes/new_username -m new_username To add a user to the sudo group:
sudo usermod -aG sudo username To add a new user with a home directory in /homes:
Create the directory (if it doesn’t exist):
sudo mkdir -p /homes Add the user:
sudo useradd -m -d /homes/new_user -s /bin/bash new_user Set a password:
sudo passwd new_user Ensure home directories are secure:
Set permissions:
sudo chmod 700 /homes/new_user Set ownership:
sudo chown new_user:new_user /homes/new_user /etc/hostname and /etc/hosts.usermod.sudo group./homes.If you have any more questions or need further assistance, feel free to ask!