RHCE Linux Commands : Login in to Linux Terminal
A virtual console is a command line where you can log into and control Linux. As RHEL is a multi-terminal operating system, you can log into Linux, ever with the same user ID, several times. It’s easy to open a new virtual console. Just use the appropriate ALT-function key combination. E.g. pressing ALT+F2 brings you to second virtual console. You can switch between adjacent virtual console by pressing ALT+Right ARROW or ALT+Left ARROW. E.g. to move from virtual console 2 to virtual console 3, press ALT+Right ARROW.
You can switch between virtual terminals by just press the
ALT+CTRL+Function key combinations.
ALT + CTRL + F1 for terminal 1
ALT + CTRL + F2 for terminal 2
ALT + CTRL + F3 for terminal 3
ALT + CTRL + F4 for terminal 4
ALT + CTRL + F5 for terminal 5
ALT + CTRL + F6 for terminal 6
ALT + CTRL + F7 for terminal 7
Terminal 7 is by default graphic mode beside it all six terminals are CLI (Command Line Interface) base. Open any terminal using press ALT+CTRL+F1 key combination. Root account is automatically created when we install Linux.
Type root on login name and press enter key, now give password (no asterisk character like windows to guess the password length) When you login from root account you will get # sign at command prompt, and when you login from normal user you will get $ sign prompt.
This command is used for clearing the screen.
You have 3 options to logout
All three commands perform same task
/root PWD (Print Working Directory) command will tell you about current location from/ partition.
ls command List the object in directory. All directories are listed in blue color while files are shown white color.
Normal ls command will not list the hidden file use -a switch with ls command to list the hidden files.
ls command with -l switch will list the object in long formats.
Same as ls -l. first and major task for any system administrator is use managements, for testing purpose you can perform all task with root account but in real life root account is used for administrative purpose only. Let’s create a normal user account for further practice.
#useradd [ user name ]
useradd command is used to create user. Several advance options are used with useradd command, but you will learn about soon.
#passwd [ user name ]
in Linux no user can be login without password. “passwd” command is used to assign password for any user. Do not execute this command without username other wise it will changes root password. Some basic commands which are required to perform day to day task by user. In our last assignment we created a normal user name thinker. Now login from thinker, and try to find out what are the difference you noticed when you login from normal user.
In bracket right most side is showing user name thinker and beside @ localhost is the hostname of computer and further ~ sign is showing that user is presently logged in her home directory. But first, every Linux user has a home directory. You can use the tiled “~” to represent the home directory of any currently active user.
For Example, if your user name is thinker, your home directory is home/thinker.
If you have logged in as the root user, your home directory is /root.
Thus, the effect of the cd ~ command depend on your username.
For Example, if you have logged In as user prafulla, the cd command bring you to the
/home/prafulla directory. if you have logged In as root user this command bring you to the /root directory. You can list the contents of your home directory from anywhere in the directory tree with the ls ~ command. After bracket you can see the command prompt of normal user is $ sign.
-P. M. Sagavekar