In order to create a new user in a Linux Ubuntu distribution from terminal, you have to use this command.
sudo adduser username
After this, the system will ask you some parameters included the password.
[23:43:24] ubuntu|zoar:~$ sudo adduser yvoictra
Adding user yvoictra' ... Adding new groupyvoictra' (1001) …
Adding new user yvoictra' (1001) with groupyvoictra' …
Creating home directory /home/yvoictra' ... Copying files from/etc/skel' …
Retype new password:
passwd: password updated successfully
Changing the user information for yvoictra
Enter the new value, or press ENTER for the default
Full Name : Yvoictra
Room Number :
Work Phone :
Home Phone :
Is the information correct? [Y/n] y
There are lot of people that simply like to customize the appearence of the terminal, is my case. When you use a terminal during a lot of time, it usually helps to have a prompt more visible than the default one.
First of all, you should make a backup of the configuration file in order to fall back in case it is necessary. The file is at the user $HOME, so first step is to go the directory.
cp -p .bashrc .bashrc-backup
Adding the new configuration in .bashrc file
Now, is the moment to edit the file .bashrc and add the new configuration to have the customized prompt.
I am used to use the vi editor to modify the configuration.
Once open the file, you should go to the end of the file. The way to do it in vi is using the key combination “Shift+G”. Once the cursor is positioned at the end, start edit mode in vi using the “o” key. Add next configuration at the end of the file.
Connect with SSH to your machine and execute next command
sudo dpkg-reconfigure locales
After this, you will see a list of languages and countries. You have to select with space bar the language and country you need. In my case, as I live in Spain, I have selected es_ES.UTF-8. It is recommended to choose UTF-8 version.
Finally, Ubuntu will ask you to select the default language to use in the operating system.
After that, you should configure the language in the keyboard with this command:
sudo dpkg-reconfigure keyboard-configuration
Now, we will configure the timezone
sudo dpkg-reconfigure tzdata
I have select the country (Europe) and the city (Madrid) where I live, so the timezone has been updated.
Finally it is recommended to reboot the system to apply the changes.