Showing posts with label VirtualBox. Show all posts
Showing posts with label VirtualBox. Show all posts

Sunday, June 19, 2016

Install CentOS on VirtualBox Part 3 : Installing the Gnome Desktop Environment

In previous blog we've installed the CentOS operating system on VirtualBox however, when we reboot, it takes us to a text prompt.  In this blog we will be installing a graphical desktop environment to our operating system using "yum".  Follow the steps below to get the Gnome desktop in your CentOS.

1.  Make sure you have internet connection
2.  Click "Start" on your "CentOS" VM


3.  After the boot messages you will be presented with login prompt.  Type in the login name of the Administrator user that you've created on the last blog.



6.  Now type sudo yum groupinstall "GNOME Desktop" without the quotes



7.  Type y when asked "Is this ok [y/d/N]



8. After the Gnome desktop has been installed type reboot now -r to reboot CentOS


9.  After the CentOS has been rebooted, login using the Administrator user and type sudo systemctl set-default graphical.target this step is optional.  You only want to do this if you want to start up CentOS in desktop mode.


10.  Now to see the installation work type sudo systemctl start graphical.target to start the Gnome Desktop



11.  The Gnome Desktop login screen will appear


12.  Login and to start using the Gnome Desktop


Install CentOS Part 4 : Adding A New User With useradd and usermod Command

One of the most common task you have to do as a Linux administrator is to add a new user.  Especially developers who always wants root access.  To accomplish this task you can use the useradd command in the Terminal session.  Follow the steps below to add a new user to CentOS.

1.  Switch into the root user using su - command

2. Type the following command useradd -s  /bin/bash -d /home/john -m john then press "Enter"


useradd is the command to add a new user to CentOS, below is an explaination of what each switch means in the command above

-s --shell SHELL - the login shell of the new account, which is the/bin/bash shell
-d --home-dir HOME_DIR - home directory of the new account, which is /home/john

3.  Type ls /home to list the content of the /home directory and you will see the john directory has been created for the user john

4.  We've created a new user name john, but he has no password, to set a password for john we can use the passwd command.  Type the following command to assign john a password passwd john  type in john's password when prompted with New Password:   and confirm the password when prompted with Retype new password:


5.  Even though john has a login, we still don't know what John's full name is to assign a real name to the login john we can use the usermod -c command to assign the login name john a real name

the command above usermod -c "John Wallace" john assigns the name John Wallace to the user name john