Beginning Linux - Chapter 2 01-28-2014, 05:31 PM
#1
Beginning Linux – CH2
What is in this Chapter?
How to navigate throughout the desktop and access the various applications that you will require for your work
Navigate through the files in your desktop using either a graphical user interface (GUI) or a command line interface (CLI)
Using some basic commands and instructions.
Manage the users on your system
Also we have used some sources for making the tutorials which includes:
Introduction.
Now that we have installed a Linux distribution, of our choice, say CentOS, now we will wander around the system in order to familiarize ourselves with the operating system environment. CentOS is based on Red Hat Enterprise Linux (RHEL) and has an alike interface and great design. The applications are neatly organized according to their function, configuration can be handled centrally, and a uniform interface exists among all the applications that are part of the distribution.
Nevertheless, in spite of the intuitive nature of the desktop, there are several concepts to be aware of before you can use the desktop effortlessly and customize it to your needs. This chapter will attempt to familiarize you quickly with the various components of the desktop that you’re likely to use frequently. Many of the concepts that we cover briefly in this chapter will subsequently be explained in greater depth in later chapters of the book.
Graphical Mode
Graphics mode is now default on most of the desktop computers. You know you will connect to the system using graphical mode when you are first asked for your user name, and then, in a new window, to type your password. To log in, make sure the mouse pointer is in the login window, provide your user name and password to the system and click OK or press Enter.
NOTE: Be careful with the root account.
Now, open a terminal window or Xterm for short (X being the name for the underlying software supporting the graphical environment). You can find it under Applications->Utilities, or System Tools, depending on the Distro you are using. In some Distros clicking the right mouse button on the desktop background will also present you with a menu containing a terminal window application. While browsing the menus, you will notice that a lot of things can be done without entering commands via the keyboard. For most users, the good old point-’n'-click method of dealing with the computer will do. But this guide is for future network and system administrators, who will need to meddle with the heart of the system.
![[Image: 1.jpg]](http://linuxlounge.info/wp-content/uploads/2014/01/1.jpg)
They need a stronger tool than a mouse to handle all the tasks they will face. This tool is the shell, and when in graphical mode, we activate our shell by opening a terminal window. The terminal window is your control panel for the system. Almost everything that follows is done using this simple but powerful text tool. A terminal window should always show a command prompt when you open one. This terminal shows a standard prompt, which displays the user’s login name, and the current working directory, represented by the twiddle or a tilde sign (~):
![[Image: 21-1024x575.png]](http://linuxlounge.info/wp-content/uploads/2014/01/21-1024x575.png)
Another common form for a prompt is this one:
In the above example, user will be your login name, hosts the name of the machine you are working on, and dir an indication of your current location in the file system. The dollar sign ($) indicates that you are working on terminal as a non-root user while the hash or pound sign (#) indicates that you are working on the terminal as a root user (or superuser).
![[Image: 31-1024x575.png]](http://linuxlounge.info/wp-content/uploads/2014/01/31-1024x575.png)
Later we will discuss prompts and their behaviour in detail. For now, it suffices to know that prompts can display all kinds of information, but that they are not part of the commands you are giving to your system.
To disconnect from the system in graphical mode, find Log Out in the menu and click on it. When you see the login screen again, asking to enter user name and password, logout was successful.
![[Image: 32-1024x575.png]](http://linuxlounge.info/wp-content/uploads/2014/01/32-1024x575.png)
Text Mode
In textual mode you will see a black screen with white characters, waiting for you to log in. A text mode login screen typically shows some information about the machine you are working on, the name of the machine and a prompt waiting for you to log in.
The login is different from a graphical login, in that you have to hit the Enter key after providing your user name, since there is no button. After username type your password, followed by another Enter. While entering your password, you won’t see any indication that you are entering something, not even an asterisk, and you won’t see the cursor move this is normal on Linux and is done for security reasons.
When the system has accepted you as a valid user, you may get some more information, called the message of the day, which can be anything. Additionally, it is popular on UNIX systems to display a fortune cookie, which contains some general wise or unwise (this is up to you) thoughts. After that, you will be given a shell, indicated with the same prompt that you would get in graphical mode.
NOTE: Don’t login with root account in text mode as well.
The power button
While Linux was not meant to be shut off without application of the proper procedures for halting the system, hitting the power button is equivalent to starting those procedures on newer systems. However, powering off an old system without going through the halting process might cause severe damage! If you want to be sure, always use the Shutdown option when you log out from the graphical interface, or, when on the login screen (where you have to give your user name and password) look around for a shutdown button.
Moving around the desktop.
Now, we know about different views of the system, let’s familiarize ourselves with the graphical view. The first view of the desktop after you log in is the typical interface of the GNOME desktop. GNOME is the default desktop interface for many of the Distros. This is what it looks like when you see it for the first time.
There are other desktop interfaces. One such is the KDE desktop, which is included in the CentOS distribution as well as many other distros but not installed by default. To install it, you’ll need to install the necessary KDE packages.
![[Image: panelldd-1024x575.jpg]](http://linuxlounge.info/wp-content/uploads/2014/01/panelldd-1024x575.jpg)
Before we begin discussing the desktop, let us quickly familiarize ourselves with the two main components of this desktop interface:
Let us look at the panel more closely in the figure.
• The main menu can be accessed not only from the panel, but from anywhere on the workspace. You can bring up the main menu near the mouse pointer at any time, by typing the keys Alt−F1.
• All GUI applications that you execute run in the workspace of the screen, and to switch between GUI applications, you can click on the corresponding bar on the panel. Of course, it’s easy to fill up the workspace with various executing GUI applications, so to avoid overcrowding, Red Hat Linux offers you a number of workspaces. By default, you have four such workspaces to work with.
• The workspace switcher (on the panel) allows you to switch from one workspace to another. So this allows you to have, say, a web browser and an instant messenger open in one workspace, and a spreadsheet open in a different workspace. In such a case, your workspace switcher would give you a tiny preview of the applications running on the various desktops.
• The workspace switcher shows the current active workspace by shading it blue, while the others are shaded grey. Only the GUI applications and their respective task bars in the active workspace are visible at any time. You can switch to a different workspace by clicking on the corresponding workspace in the switcher.
• Also note that the workspace switcher itself is configurable. If you right−click on the workspace switcher and select Preferences, you’ll get a dialog that allows you to control the number of workspaces and the way they’re displayed in the panel.
• The panel allows you to add small applications (called applets) in the panel itself. In fact the workspace switcher and the date/time sections of the panels are both small applets that are designed to reside in the panel.
What is in this Chapter?
How to navigate throughout the desktop and access the various applications that you will require for your work
Navigate through the files in your desktop using either a graphical user interface (GUI) or a command line interface (CLI)
Using some basic commands and instructions.
Manage the users on your system
Also we have used some sources for making the tutorials which includes:
- Some Websites.
- Wrox Beginning
- Red Hat Linux.
- Intro Linux
Introduction.
Now that we have installed a Linux distribution, of our choice, say CentOS, now we will wander around the system in order to familiarize ourselves with the operating system environment. CentOS is based on Red Hat Enterprise Linux (RHEL) and has an alike interface and great design. The applications are neatly organized according to their function, configuration can be handled centrally, and a uniform interface exists among all the applications that are part of the distribution.
Nevertheless, in spite of the intuitive nature of the desktop, there are several concepts to be aware of before you can use the desktop effortlessly and customize it to your needs. This chapter will attempt to familiarize you quickly with the various components of the desktop that you’re likely to use frequently. Many of the concepts that we cover briefly in this chapter will subsequently be explained in greater depth in later chapters of the book.
Graphical Mode
Graphics mode is now default on most of the desktop computers. You know you will connect to the system using graphical mode when you are first asked for your user name, and then, in a new window, to type your password. To log in, make sure the mouse pointer is in the login window, provide your user name and password to the system and click OK or press Enter.
NOTE: Be careful with the root account.
Spoiler:
It is generally considered a bad idea to connect (graphically) using the root user, the system administrator’s account, since the use of graphics includes running a lot of extra programs, in root’s case with a lot of extra permissions. To keep all risks as low as possible, use a normal user account to connect graphically. But there are enough risks to keep this in mind as a general advice, for all use of the root account: only log in as root when extra privileges are required. After entering your user name/password combination, it can take a little while before the graphical environment is started, depending on the CPU speed of your computer, on the software you use and on your personal settings.
Now, open a terminal window or Xterm for short (X being the name for the underlying software supporting the graphical environment). You can find it under Applications->Utilities, or System Tools, depending on the Distro you are using. In some Distros clicking the right mouse button on the desktop background will also present you with a menu containing a terminal window application. While browsing the menus, you will notice that a lot of things can be done without entering commands via the keyboard. For most users, the good old point-’n'-click method of dealing with the computer will do. But this guide is for future network and system administrators, who will need to meddle with the heart of the system.
![[Image: 1.jpg]](http://linuxlounge.info/wp-content/uploads/2014/01/1.jpg)
They need a stronger tool than a mouse to handle all the tasks they will face. This tool is the shell, and when in graphical mode, we activate our shell by opening a terminal window. The terminal window is your control panel for the system. Almost everything that follows is done using this simple but powerful text tool. A terminal window should always show a command prompt when you open one. This terminal shows a standard prompt, which displays the user’s login name, and the current working directory, represented by the twiddle or a tilde sign (~):
![[Image: 21-1024x575.png]](http://linuxlounge.info/wp-content/uploads/2014/01/21-1024x575.png)
Another common form for a prompt is this one:
Code:
[user@host dir]$In the above example, user will be your login name, hosts the name of the machine you are working on, and dir an indication of your current location in the file system. The dollar sign ($) indicates that you are working on terminal as a non-root user while the hash or pound sign (#) indicates that you are working on the terminal as a root user (or superuser).
![[Image: 31-1024x575.png]](http://linuxlounge.info/wp-content/uploads/2014/01/31-1024x575.png)
Later we will discuss prompts and their behaviour in detail. For now, it suffices to know that prompts can display all kinds of information, but that they are not part of the commands you are giving to your system.
To disconnect from the system in graphical mode, find Log Out in the menu and click on it. When you see the login screen again, asking to enter user name and password, logout was successful.
![[Image: 32-1024x575.png]](http://linuxlounge.info/wp-content/uploads/2014/01/32-1024x575.png)
Text Mode
In textual mode you will see a black screen with white characters, waiting for you to log in. A text mode login screen typically shows some information about the machine you are working on, the name of the machine and a prompt waiting for you to log in.
The login is different from a graphical login, in that you have to hit the Enter key after providing your user name, since there is no button. After username type your password, followed by another Enter. While entering your password, you won’t see any indication that you are entering something, not even an asterisk, and you won’t see the cursor move this is normal on Linux and is done for security reasons.
When the system has accepted you as a valid user, you may get some more information, called the message of the day, which can be anything. Additionally, it is popular on UNIX systems to display a fortune cookie, which contains some general wise or unwise (this is up to you) thoughts. After that, you will be given a shell, indicated with the same prompt that you would get in graphical mode.
NOTE: Don’t login with root account in text mode as well.
Spoiler:
Log in as root only to do setup and configuration that absolutely requires administrator privileges, such as adding users, installing software packages, and performing network and other system configuration. Once you are finished, immediately leave the special account and resume your work as a non-privileged user. Alternatively, some distributions of Linux, like Ubuntu, force you to use sudo, so that you do not need direct access to the administrative account. However, if you want to get superuser or root access until you logout- simply type su and press enter and give the password for root. So, Logging out is done by entering the logout command, followed by Enter. You are successfully disconnected from the system when you see the login screen again.
The power button
While Linux was not meant to be shut off without application of the proper procedures for halting the system, hitting the power button is equivalent to starting those procedures on newer systems. However, powering off an old system without going through the halting process might cause severe damage! If you want to be sure, always use the Shutdown option when you log out from the graphical interface, or, when on the login screen (where you have to give your user name and password) look around for a shutdown button.
Moving around the desktop.
Now, we know about different views of the system, let’s familiarize ourselves with the graphical view. The first view of the desktop after you log in is the typical interface of the GNOME desktop. GNOME is the default desktop interface for many of the Distros. This is what it looks like when you see it for the first time.
There are other desktop interfaces. One such is the KDE desktop, which is included in the CentOS distribution as well as many other distros but not installed by default. To install it, you’ll need to install the necessary KDE packages.
![[Image: panelldd-1024x575.jpg]](http://linuxlounge.info/wp-content/uploads/2014/01/panelldd-1024x575.jpg)
Before we begin discussing the desktop, let us quickly familiarize ourselves with the two main components of this desktop interface:
- The panel: This is the complete grey rectangular box at the bottom of the screen. It contains various shortcut buttons (which launch applications when clicked), a menu that provides access to more applications, a workspace switcher, an application tab bar, a status notification bar, and the date−time applet. As we’ll soon see, it’s quite easy to modify the panel, by adding more options to the menu, more applets, and other application shortcut buttons.
- The workspace: This is the large area that makes up most of the screen. When you run (or launch) a GUI application, it becomes visible in the workspace. By default, Red Hat Linux places a few application shortcuts (or launchers) on the workspace − the screenshot above shows three such shortcuts in the top left of the workspace. As you’ll see later, it’s easy to add your own shortcuts too.
Let us look at the panel more closely in the figure.
- Main menu - Main Menu offers an organized set of applications that can be launched from the desktop.
- Shortcut Buttons - Just like on Windows we have/had Quick Launch buttons, here in Linux we have shortcut buttons for various apps on the menu bar. You can add items by dragging them from the main menu.
- Workspace Switcher - Grey rectangular box, we will cover that later.
- Taskbar - Shows what applications are running.
- User Information Bar - Here you can see your Account Information, Lock your PC, switch users or Log out completely.
- Date and Time applet - Shows current date and time.
As you can probably tell from what you’ve seen so far, the look and feel of this interface should be familiar to users of other GUI−based operating systems. However, Red Hat Linux boasts several additional features in this interface. For example:
• The main menu can be accessed not only from the panel, but from anywhere on the workspace. You can bring up the main menu near the mouse pointer at any time, by typing the keys Alt−F1.
• All GUI applications that you execute run in the workspace of the screen, and to switch between GUI applications, you can click on the corresponding bar on the panel. Of course, it’s easy to fill up the workspace with various executing GUI applications, so to avoid overcrowding, Red Hat Linux offers you a number of workspaces. By default, you have four such workspaces to work with.
• The workspace switcher (on the panel) allows you to switch from one workspace to another. So this allows you to have, say, a web browser and an instant messenger open in one workspace, and a spreadsheet open in a different workspace. In such a case, your workspace switcher would give you a tiny preview of the applications running on the various desktops.
• The workspace switcher shows the current active workspace by shading it blue, while the others are shaded grey. Only the GUI applications and their respective task bars in the active workspace are visible at any time. You can switch to a different workspace by clicking on the corresponding workspace in the switcher.
• Also note that the workspace switcher itself is configurable. If you right−click on the workspace switcher and select Preferences, you’ll get a dialog that allows you to control the number of workspaces and the way they’re displayed in the panel.
• The panel allows you to add small applications (called applets) in the panel itself. In fact the workspace switcher and the date/time sections of the panels are both small applets that are designed to reside in the panel.



![[Image: znALY5V.jpg]](https://i.imgur.com/znALY5V.jpg)
![[+]](https://sinister.li/images/modern/collapse_collapsed.png)



![[Image: TeusoI9.png]](http://i.imgur.com/TeusoI9.png)

![[Image: 5IN9GdK.png]](http://i.imgur.com/5IN9GdK.png)





![[Image: KApAKtG.jpg]](http://i.imgur.com/KApAKtG.jpg)