Thursday, December 11, 2008

Accessing Ubuntu Linux from the Command Line Interface

For the command line interface, you are initially provided a login prompt. On Ubuntu, you can access the command line interface by pressing ctrl-alt-f1 at any time (alt-f7 returns to the graphical interface). The login prompt is preceded by the hostname you gave to your system. When you finish using Linux, you first log out. Linux then displays exactly the same login prompt, waiting for you or another user to log in again. This is the equivalent of the login window provided by the GDM. You can then log in to another account.

Once you log in to an account, you can enter and execute commands. Logging in to your Linux account involves two steps: entering your username and then entering your password. Type in the username for your user account. In the next example, the hostname is turtle, and the user enters the username richlp and is then prompted to enter a password:

Ubuntu release 8.04
Kernel 2.6 on an i686

turtle login: richlp
Password:

When you type in your password, it does not appear on the screen to protect your password from being seen by others. If you enter either the username or the password incorrectly, the system will respond with the error message “Login incorrect” and will ask for your username again, starting over the login process. You can then re-enter your username and password.

Once you enter your username and password correctly, you are logged in to the system.
The command line prompt is displayed, waiting for you to enter a command. Notice the command line prompt is a dollar sign ($), not a number sign (#). The $ is the prompt for regular users, whereas the # is the prompt solely for the root user. In this version of Ubuntu, your prompt is preceded by the hostname and the directory in which you are working. Both are bounded by a set of brackets:

[turtle /home/richlp]$

To end your session, issue the logout or exit command. This returns you to the login prompt, and Linux waits for another user to log in.

[turtle /home/richlp]$ logout

To log out and shut down your system from the command line, enter the halt command:

$ halt

Source of Information : McGraw Hill Ubuntu The Complete Reference

No comments: