The Command Line
You can access bash through a terminal emulator which is a graphical-type window that you can open and use to access the bash command-line. It is built with scroll bars, drop-down menus to customize your view, and the ability to copy screen output to the system clipboard. There are several different terminal emulators available. Which one you use will probably depend on which desktop environment you choose. If you use a distro that runs with the Gnome desktop environment, you'll probably be using the "gnome-terminal".
Lesson 2 / Lesson 4
Open a terminal and look at the prompt, it should look something like this:
It will list the user's name and the machine that they are on. It is ready to accept commands and pass them to the kernel.
The command line interface will either be from a terminal or a TTY connection. Here is an example of the Gnome terminal. You can see that it is only text but it does have a menu system for modifying the color of the screen and text or allowing you to open multiple terminals at one time. The shell prompt provides information by default including; username, host, file location and user privileges.
If you login from a SSH session from a Windows machine, using a program like Putty, or if you are logged into a TTY session on the Linux box you will not have the option of a terminal and so you will be using text only as there will be no menus or graphics of any kind. Text is exactly the same as you can see in the next example. The biggest difference is that it will typically be a black screen with white text.
As you change users the prompt will show the change in user as you can see from these examples:
As you change to different servers the hostname will change. The hostname is a name that is applied to a server so that users and applications may refer to the server with a name and not an IP Address. An example would be the hostname of ub instead of the IP Address 192.168.5.43. As you connect to different servers or workstations, this name will change. These names can be anything the system administrator would like to assign.
As you change locations in the file system the location will change. The ~ symbol indicates that a user is located in their home directory. The home directory in Linux is located in a directory, Windows calls them folders, labeled /home. So if fred is in his home directory he is really located in /home/fred. Each user has a home directory named for the user. If fred changes location in the directory system to /var, his prompt will reflect that change.
If mary changes to the /usr/share directory it will reflect that change.
If tom changes to the /usr/bin directory it will reflect that change.
And finally if jane moves to the / directory it will reflect that change.
Changes in location in the file system will list the location in the prompt. It is important that you use this as a clue to location especially when you begin to issue commands.
Copyright CyberMontana Inc. and BeginLinux.com
All rights reserved. Cannot be reproduced without written permission. Box 1262 Trout Creek, MT 59874