helps‎ > ‎

users/host name

Add or change user in Linux

sudo adduser <name>
(setting password is automatically asked, and home directory created)
then set the home dir of new user to be owned by new user
sudo chown <user>:<user> /home/<user>

[not sure about this below] 
to make the new user belong to same groups as first user, find groups of the first user
groups <user>
then add new user to each group
sudo adduser <user> <group>

add new user to sudoer file
sudo visudo

If replacing first user (i.e. changing the name) copy content of /home/first-user to /home/new-user with sudo thunar
or sudo cp /home/olduser/* /home/newuser

to remove a user
userdel <user>
or to remove the home dir with it
userdel -r <user>

Problems will start appearing, like MLT in kdenlive calling all clips invalid, ffmpeg cannot open filters.... so these need permissions changed in the right places, or simply re-installing them if in the case of migrating to a new user.

Change the host/server name
sudo nano /etc/hostname /etc/hosts

change it in those files - twice in /etc/hosts
then restart the server
sudo sh -c /etc/init.d/ start