You might run into a situation that requires you to change your computer name, either because you need it to meet a naming scheme or you’re just bored with it and want something better. By following these steps, you’ll give your computer a new identity in no time.
Step 1 Open terminal by pressing Ctrl + Alt + T and enter following commands to open the hostname file.
sudo vi /etc/hostname
Step 3 Now open the host file by running following command
sudo vi /etc/hosts
Step 5To change your system workgroup name, we need to edit samba smb.conf file. Run following command to open samba configuration file
sudo vi /etc/samba/smb.conf
Step 7 Close all open windows and restart your system. After your system has restarted, it will have the new computer name and workgroup.