30.6 KB
Newer Older
arpinux's avatar
arpinux committed
# ![desktop](img/desktop.png) The graphical environment
arpinux's avatar
arpinux committed
2 3

**Let's start by looking at the various elements displayed on the screen.**
4 5
On this simple image, you can already identify the first elements which are 
explained below in this handbook:
arpinux's avatar
arpinux committed

7 8
**The "panel" or task bar** (at the top of the screen, in this example, but 
can be moved wherever you wish)) which includes, from left to right:
arpinux's avatar
arpinux committed
9 10 11 12 13 14 15

- the "application menu" listing your installed software,
- a collection of launchers (small icons) for your favorite applications,
- the list of the currently open windows,
- the list of virtual desktops,
- the time,
- the notification area, (showing the wired network connection),
16 17
- the user button which allows you to quit your working session, stop or 
restart your computer,
arpinux's avatar
arpinux committed

19 20
**a file manager window** which displays the folders contained in your 
home directory.
arpinux's avatar
arpinux committed
21 22 23

![The Xfce desktop with the application menu and Thunar](img/deb9-prezdesktop.png)  

24 25
You will discover other interfaces and layouts in the chapter dedicated to 
desktop environments (chap 4.2).
arpinux's avatar
arpinux committed
26 27 28

## The task bar

29 30
The "panel", the task bar, the notification area... all these words to talk 
about the information and launcher interface of your system.
arpinux's avatar
arpinux committed

32 33 34 35
Usually, it is a banner located at the top or the bottom of your screen, displaying 
several types of information, launchers, menus to quickly access your data or your 
applications, but also to inform you (new email has arrived, what time it is, a USB 
disk was just plugged in …) via the notification area.
arpinux's avatar
arpinux committed

37 38
Here after a quick overview of the various "panels" on the Debian desktops: Gnome, 
Xfce, LXDE, MATE, Cinnamon and KDE:
arpinux's avatar
arpinux committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53

![panel Gnome-Shell](img/deb9-gnome-panel.png)

![panel Xfce](img/deb9-xfce-panel.png)

![panel LXDE](img/panel_lxde.png)

![panel MATE](img/panel_mate.png)

![panel Cinnamon](img/deb9-cinnamon-panel.png)

![panel KDE](img/deb9-kde-panel.png)

Irrelevant of the type of desktop, the task bar displays, at least, the following elements:

54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
- **An application menu**, allowing you to access to the installed software.. In genral, 
the applications are sorted and grouped by categories (Multimedia, Office...) and are 
launched by a left-click on their labels or icons.
- **A list of active windows** or at least the title of the active windows. Depending on 
the context, a left click on the corresponding button will minimize, restore or bring to 
the foreground the target application.
- **The time with the date** also displayed when the cursor hovers on the area. On some 
desktops an agenda is open by a left-click on the time.
- **A notification area** with more or less information, depending on the desktop, 
intended to display messages coming from your applications (new email, network connection ...)
- **An action button** to quit the working session, to suspend, stop or restart your 
computer. Depending on your configuration you might switch user, with this button, and 
take advantage of the multi-user mode of the Debian GNU/Linux systems.

Like almost all the elements of the GNU/Linux desktops, the task bar can be configured 
and embellished by plug-in (little specialized modules) or simply removed ![](img/wink.png) !

A right-click on the "panel " opens a drop down menu allowing you to change its 
configuration (except for the Gnome-3 desktop). Hereafter an example of configuration 
for the Xfce panel:
arpinux's avatar
arpinux committed
74 75 76 77 78 79 80 81 82

![Accessing the Xfce panel configuration with a right-click](img/panel_xfce_cfg1.jpg)  

![The 3 tabs of the Xfce panel configuration](img/panel_xfce_cfg2.jpg)  

More details in the GNU/Linux desktop discovery section (chap.4.2).

## Menus

83 84
The various applications installed in your system are available through several vectors: 
launchers on the desktop, or in the task bars, and more generally using the **menus**.
arpinux's avatar
arpinux committed

86 87 88
In the menus, your programs are **listed and sorted by categories**. A left-click on
the menu icon displays the application and section entries. A left-click on a program 
icon launch the corresponding application. Each desktop has its own specific menu:
arpinux's avatar
arpinux committed
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103

Cinnamon menu by category:

![Cinnamon menu](img/deb9-cinnamon-menu.png)

Classic drop down Xfce menu:

![Xfce menu](img/deb9-xfce-menu.png)

Gnome-Shell full screen menu:

![Gnome-Shell menu](img/deb9-gnome-menu.png)

## Windows

104 105 106
Your applications, your data, your USB keys, are usually displayed within a decorated 
frame. Each desktop environment decorates windows its own way, but most of the times 
they implement the same functions:
arpinux's avatar
arpinux committed

108 109 110 111 112 113 114
- **the title bar** at the top displays the window title and the action buttons 
- **the decorations** around the window, which include two areas at the bottom to 
resize the window using a mouse left-click
- **the status area**: some applications display informations at the bottom of the 
window (like free space available in the active partition, size of the file currently 
pointed at ...) 
arpinux's avatar
arpinux committed
115 116 117 118 119

Hereafter an example of windows on the Gnome desktop:

![The Firefox web browser and the file manager under Gnome](img/presentation_fenetres.png)

120 121
Actions on windows are generally executed with the mouse but are also possible with 
the keyboard: either directly with a function key, or by using a keyboard shortcut (chap 2.3.2).
arpinux's avatar
arpinux committed
122 123 124

### Closing a window

125 126
To close a window, left-click on its "close" button, usually symbolized by a cross in 
the top right corner of the window.
arpinux's avatar
arpinux committed
127 128 129 130 131

![Closing a window with the mouse](img/fermer_une_fenetre.jpg)

### Moving a window

132 133 134
To move a window on your screen simply move your pointer on the **title bar** 
(the top banner of the window) then press and hold the left-click. The pointer will 
then change its usual look:  
arpinux's avatar
arpinux committed
135 136 137
from ![pointeur](img/pointeur_default.png) to ![main](img/pointeur_main.png)

The window will then follow the mouse motion until you release the left button.  
138 139
If you don't have access to the title bar, you can use the special [Alt] key on 
your keyboard together with the mouse left-click to grab and move your window.
arpinux's avatar
arpinux committed
140 141 142

### Resizing a window

143 144
Windows are automatically open on the screen with a certain size. To close them, 
we have seen already that we need to click on the close button symbolized by a cross.
arpinux's avatar
arpinux committed

146 147 148 149 150 151
**To resize a window**, you need to move your cursor on the borders of the window or, 
even better, on one of the bottom corners.  
The pointer will then change its usual look: from ![pointeur](img/pointeur_default.png) 
to ![pointeur bl](img/pointeur_bl.png) or ![pointeur br](img/pointeur_br.png) 
depending on its left or right position. When the look of the pointer changes, 
press the left-button and move the mouse to resize the window like you want.
arpinux's avatar
arpinux committed

153 154 155
An alternative solution consists in using use the special [Alt] key on your keyboard. 
Move the pointer inside the window, then press together the [Alt] key and the 
right-button of the mouse. Then you will be able to resize the window.
arpinux's avatar
arpinux committed

157 158 159 160
**To maximize the window**, double-click (click twice quickly with the mouse 
left-button) on the title-bar (when using the GNOME environment) or use the 
maximize button located next to the close button, if present (and it is the 
case on most of the desktops).
arpinux's avatar
arpinux committed
161 162 163

## Virtual desktops

164 165 166 167 168 169
To avoid overloading your workspace, the Debian GNU/Linux environments support, 
since several years, the virtual desktop concept: the elements displayed on your 
screen lay upon a "desktop". You can have several of them, which means that if 
you move to another "desktop", it will be empty at first. If you return back to 
the previous desktop, you will find it in the same state as you left it (with 
your applications opened).
arpinux's avatar
arpinux committed

arpinux's avatar
arpinux committed
arpinux's avatar
arpinux committed
**... "Several desktops" ... What do you mean exactly ??**  
173 174 175 176 177 178 179 180 181 182 183
Well, it's like having **several screens** for your computer, lined up 
**behind each other**, with the capability to change their order at will. You 
open the Internet navigator full screen on the first virtual desktop, then you 
feel like having a look at your latest family pictures. So you **go to the next 
desktop** which happens to be empty, and you can then display there your 
pictures also in full screen mode, and return back to the first desktop and 
enjoy the full real estate for the comfort of your navigation.  
It is also a nice mean to get **organized with your tasks**: the first desktop 
is reserved for the Internet applications, the second for the multimedia, 
the third for the office work and so on, allowing you to leave open your work 
in progress, for future modifications, without impacting the other activities.
arpinux's avatar
arpinux committed
184 185 186 187 188 189 190

Each environment has its own way to represent the virtual desktops:

**Gnome** displays shrunk desktops on a side panel:

![Gnome and 4 virtual desktops displayed on the right panel](img/deb9-gnome-bureau-virtuel.png)

191 192
**Xfce** displays the virtual desktops in its top panel, within frame shapes 
representing the different workspaces.
arpinux's avatar
arpinux committed
193 194 195 196 197

![Xfce and 4 virtual desktops shown in the panel](img/deb9-xfce-bureau-virtuel.png)

## File management on GNU/Linux

198 199 200 201 202 203
All your data, your videos, your documents, your pictures, are regarded by Debian 
GNU/Linux as files, and these files are organized into folders.  
Debian is an operating system (the big piece of software making your computer 
functional) which organizes the data according to their respective addresses, that 
is the path to follow, in order to access them, from the general starting point 
(the system root identified by the "/" symbol).
arpinux's avatar
arpinux committed

arpinux's avatar
arpinux committed
arpinux's avatar
arpinux committed
**... the picture of grandma is a "file" having an "address" relative to a "root" ???**  
207 208 209 210 211 212 213 214 215 216
Imagine your computer is like your house. If your favorite book is located in a 
certain place, this "place" is like an address relative to the "house".  For 
example, if the book stands in the second drawer of your nightstand, one can 
define its address (the path to follow in order to reach it) like this: 
Home,bedroom,nightstand,2nd drawer,favorite book.  
To separate the various "items" we use the "/" symbol, which gives the following 
address in computer language: /home/bedroom/nightstand/2nd drawer/favorite book.  
The "root of the system is symbolized by a simple "/". The main folder containing 
all the users data is symbolized by "/home/, and your personal folder is named 
arpinux's avatar
arpinux committed
217 218
If we come back to the favorite book example, its address could be:  
arpinux's avatar
arpinux committed
219 220 221

### Your personal data

222 223 224 225
Your personal data are stored within your *personal folder*, whose address is 
"/home/your_user_name". They are organized within folders to to ease the finding 
and consulting of the files, by yourself or by some programs (it is very logical 
for a photo viewer to open first in the "Pictures" folder).
arpinux's avatar
arpinux committed

227 228 229
To help you better organize your data, Debian is distributed with few folders 
already defined in your personal folder: Desktop, Documents, Downloads, Models, 
Music, Pictures and Videos.
arpinux's avatar
arpinux committed
230 231 232

![The system file manager Nautilus, on Gnome, with two open tabs](img/donnees_perso.png)

233 234 235 236
**NOTE**: Most of the objects you find in the computer file system are either 
files, or folders.  
In the following sections of this manual we will use the word "Item" when the 
distinction between "File" and "Folder" is irrelevant. 
arpinux's avatar
arpinux committed
237 238 239

### Your hidden files

240 241 242 243
Some items within your personal folder, relate to your interface configuration, 
the various fonts you are using, your passwords stored in Firefox, etc.  
This type of data does not need to be always displayed on the screen when you 
consult your photos or documents: this is why these items are *hidden*.
arpinux's avatar
arpinux committed

245 246 247 248
They are identified by the form "/home/your_user_name/.hidden_file". Please 
note the "**.**" (dot) symbol in front of the file name.  
When you want to display them press together [Ctrl]+'h' (h obviously for "hidden"), 
or from the menu of your file manager window goto "View" > "Show Hidden Files":
arpinux's avatar
arpinux committed
249 250 251 252 253

![Show hidden files in Nautilus on Gnome](img/fichiers_caches.png)  

### System files

254 255 256
Debian GNU/Linux includes a collection of programs to navigate on the Internet, 
inside your personal folder, among all your photo albums, etc. These programs are 
stored inside "system folders".
arpinux's avatar
arpinux committed

258 259 260 261 262
These folders are write-protected and some are also read-protected: this means 
that you can consult some of them, but you may not modify any of them, as being 
a simple user.  
In order to modify these items, you need to use the system administrator 
account: "root" (chap.3.8.3).
arpinux's avatar
arpinux committed
263 264 265 266

## An example of system file manager: Thunar

267 268 269 270 271 272 273 274 275 276 277
**Thunar** is the file manager by default with the **Xfce** desktop. This program 
let you navigate through your various folders, "Pictures", "Documents", etc. 
by using the mouse (double-click on a folder to look into its content) or the 
keyboard (navigate among the folders with the arrows keys, and press [Enter] 
to open the selected one).The role of a file manager is to display on screen the 
content of these folders: your personal data. Thunar is accessible from the Xfce 
application menu  in the task bar, under the name "file manager".

Each GNU/Linux desktop environment has its dedicated file manager (otherwise it's 
not funny) that has a slightly different interface than Thunar. However, you will 
find the same functions of consultation, search and modification of the data.
arpinux's avatar
arpinux committed
278 279 280

### Simplified presentation of Thunar

281 282
When Thunar displays your personal folder, a number of information and tools are 
already available to you: 
arpinux's avatar
arpinux committed
283 284 285

![Presentation of the file manager Thunar](img/thunar_default.png)

286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
- **#1 The title bar**: displays the folder being viewed and the program which was 
launched. It includes the "action buttons" allowing you, with a mouse left-click, 
to minimize the window (then it will be parked in the task bar), to maximize the 
window (it will occupy the full screen), to close the window or any other actions 
available with the window manager in use.
- **#2 The menu bar**: each menu gives you the possibility to act on items 
(copy/paste/delete/rename, etc.), to change the location, the view style 
(Icons, Detailed List, Compact List), and even to close the window, always 
with a left-click.
- **#3 The location bar**: tells you which folder you are currently in, and, 
if there is enough space, the latest visited folder(s). 
- **#4 The tab bar**: tells you which folders are open in the active windows. 
Thunar tabs operate like those in your Internet navigator.
- **#5 The side pane**: displays the main folders (personal folder, wastebasket, 
file system,  desktop), your shortcuts (favorite folders) and the external 
volumes (USB keys or hard disk drives plugged as USB devices); A left-click on 
the label will display the selected folder. A middle-click will open the folder 
in a new tab (handy to copy or move data). The side pane can also display the tree 
structure of your system, that is the complete set of your folders and files 
sorted hierarchically. You can mask/display the side pane with the keyboard 
shortcut [Ctrl]+'b'.
- **#6 The main pane**: displays the folder content. If this folder includes other 
folders, they are positioned before the "simple" files (like photos, PDF documents, 
etc.) and, by default, sorted by alphabetic order.
- **#7 The status bar**: display the number of items in the concerned folder,and 
the free remaining space in the current file system , or indicates if one or 
several items are selected.
arpinux's avatar
arpinux committed
313 314 315 316 317

### Usage and functionality of Thunar

Thunar will let you consult your data, sort them, and modify them.

318 319
Note that other file managers have a different look and feel (GTK3), like placing 
the application menu directly in the title bar like Gnome for example (chap.4.2.1).
arpinux's avatar
arpinux committed
320 321 322

#### Consulting your data

323 324 325
Consulting your data is very easy. Launch Thunar which opens by default on your 
personal folder. You can then decide to open another specific folder depending 
on the type of data you are looking for.
arpinux's avatar
arpinux committed

327 328 329
**To open or explore a folder**, put the mouse pointer over it: a double-click 
with the left button will open this folder in the same window. A middle-click 
will open the folder in a new window tab.
arpinux's avatar
arpinux committed
330 331 332

You can also click on the shortcuts located in the left side pane of the Thunar window.

333 334 335 336
**To open a file**, put the mouse pointer over it:  a double-click with the left 
button will open this file with the application assigned to it by default. A 
right-click will display a contextual menu which, among other things, allows you to 
open the file with another application of your choice.
arpinux's avatar
arpinux committed
337 338 339

#### Data selection

340 341 342 343
To select several items move the mouse cursor in an empty area of the window, 
left-click,hold and simply move over all the items that you want selected. Then 
release the button. After this, you can remove one or several items from the 
selection using the shortcut [Ctrl]+left-click on each of them.  
arpinux's avatar
arpinux committed
344 345
More details in the simplified initiation (chap.

346 347
Once selected, you can apply the modifications to these items as detailed in 
the "Modifications" chapter below.
arpinux's avatar
arpinux committed
348 349 350

#### Classifying the data

arpinux's avatar
arpinux committed
351 352
You are going to say:

> I can do whatever I want with my own data
arpinux's avatar
arpinux committed

arpinux's avatar
arpinux committed
... and **you are damn right** ![](img/big_smile.png) !  
356 357 358 359
However some applications will access your data more easily if they are stored in 
their specific folders. Thus, the screen capture program will record its shots in 
the "Pictures" folder, the Internet navigator will record your downloaded files in 
the "Downloads" folder, the music player will look into the "Music" folder ... And so on.
arpinux's avatar
arpinux committed

361 362
**Thunar** allows you to create shortcuts to ease the access, the classification and 
thus the retrieving of your data.
arpinux's avatar
arpinux committed

364 365
**To create a shortcut**, just "drag and drop" the wanted folder in the side pane. 
This folder will then be always accessible with a simple click.
arpinux's avatar
arpinux committed
366 367 368

#### Data modification using the contextual menu

369 370
A contextual menu shows up when right-clicking on an item (I.E. either a folder or 
a file), and then, let you make a number of actions/modifications on this selected item.
arpinux's avatar
arpinux committed
371 372 373 374 375 376

![Contextual menu in Thunar](img/thunar_menu_contextuel.png)  

In our example the contextual menu proposes the following actions:

- **Open with the default application**, here the Ristretto image viewer.
377 378 379 380 381 382 383 384 385 386 387 388 389 390
- **Open with** another application: if you choose this option, another window 
will open and let you navigate in the system to select a different application 
(start searching in /usr/bin/app_name).
- **Send To** is a menu to share this item via email, or create a link on the 
desktop, or other different actions depending on the type of item selected.
- **Cut**: this action will **remove** the selected item with the goal of 
**pasting** it somewhere else. It is then enough to navigate into the **destination folder**, 
to make a right-click on an empty area of the window and to pick the "**Paste**" 
action in the menu.
- **Copy**: this action leaves the selected item in its original folder, but let 
you copy (clone) it into the destination folder, following the same procedure as 
the one described in the "Cut" action above.
- **Move to Wastebasket**: this action **remove** the selected item from its folder 
and move it directly into the Trash Bin (see next chapter)
arpinux's avatar
arpinux committed
391 392 393
- **Delete**: definitely delete the selected item from the system.
- **Rename**: this action let you modify the name of the selected item.
- **Set as wallpaper**: is rather explicit and appears only if a image type file is selected.
394 395 396 397 398 399 400
- **Create Archive**: this action allows you to compress one or several selected item(s). 
In the window that opens, you can choose the destination folder, by navigating in the 
side pane, enter a name for this archive and select its type. Then click on the "New" 
button to start the archive process.
- **Properties**: this action let you modify the name of a file, the default application 
when you open it, assign an "emblem" to it or manage the access rights and "Permissions" 
of the selected item.
arpinux's avatar
arpinux committed
401 402 403

#### Data removal

404 405 406
The famous "Trash bin" (or "Wastebasket") is reachable directly from the side pane 
of the Thunar window. The "full bin" icon indicates that some items are currently 
in the wastebasket.
arpinux's avatar
arpinux committed
407 408 409

![Empty the Wastebasket using the Thunar menu](img/thunar_corbeille.png)

410 411 412
**To empty the Wastebasket** and remove definitively all the items in there, 
left-click on its proper icon and take the "Empty Wastebasket" action. You can 
also use the "File" menu and then click on "Empty Wastebasket".
arpinux's avatar
arpinux committed

414 415 416
Sometimes the context menu has the "Delete" entry. Be careful because this menu 
entry will not move your files to the recycle bins: they will be deleted 
immediately and definitively.
arpinux's avatar
arpinux committed
417 418 419

## Rights and permissions

420 421 422
Debian is a **multi-user** GNU/Linux system. It is therefore necessary to put 
in place a mechanism to protect the items belonging to each user, so that user 
*Alice* could not modify the "tax & due" list of user *arp*, for example.
arpinux's avatar
arpinux committed

424 425
To achieve this goal, each file and each folder belongs to one *owner* and 
to one *users group*.
arpinux's avatar
arpinux committed

427 428 429
For each item, one can give **R**ead, **W**rite and e**X**ecute rights distinctly 
to its owner, its group or all the others (I.E. persons which are neither the 
owner nor a member of the proprietary group).
arpinux's avatar
arpinux committed

431 432 433
To display these information, one can use the "ls" (*list directory content*) 
command, with the option "-l", within a terminal window (that you will discover 
in the next chapter):
arpinux's avatar
arpinux committed
434 435 436 437

    ls -l
    -rw-r----- 1 arp money  1794 Nov 20 14:46 tax_and_due.txt

438 439 440 441
Here, one can see that the user *arp* has the "**r**ead" and "**w**rite" rights, 
on the file 'tax_and_due.txt', while the members of the *money* group (which user 
*Alice* is part of) can only "**r**ead" this file, but not modify it, and the 
others cannot even open it ("**-**", means no right).
arpinux's avatar
arpinux committed
442 443 444 445 446

![rights and permissions](img/droits-permissions.jpg)

### Rights and permissions from the contextual menu

447 448 449 450
The file managers integrated in the various Debian desktops let you also display 
and/or modify the rights and permissions of your system folders and files "with the
mouse only". To do so, you need to open the contextual menu with a right-click 
on the file/folder you are interested in, and click on "Properties":
arpinux's avatar
arpinux committed
451 452 453 454 455 456 457

![contextual menu: properties](img/menucontextuel_proprietes.png)

In  the new window which opens, click on the "Permissions" tab:

![Edition of rights and permissions from the contextual menu](img/menucontextuel_permissions.png)  

458 459
In this example, the file belongs to "Me" (arpinux), who has the Read and Write 
access, while the other users or groups have a Read only access right.
arpinux's avatar
arpinux committed
460 461 462 463

## The terminal

464 465
When you launch an application from the menu, or when you move a file from a folder 
to another by using your mouse, you send instructions to your computer in graphical mode.
arpinux's avatar
arpinux committed

467 468 469 470 471
These instructions can also be sent directly, without going trough a menu or 
launching an application, thanks to the **Terminal** which gives you access to 
**the command line**. This tool is more  accurate than the graphical interface 
because it let you use all the options available in your application. It is 
also your last resort when the graphical session is gone.
arpinux's avatar
arpinux committed

473 474 475
The only concern is that this little black box, full of strange signs, is 
somewhat frightening … But we are going to demystify all this and show you 
that the terminal can become your new friend ![](img/smile.png).
arpinux's avatar
arpinux committed

477 478
In case of doubts, don't hesitate to ask your questions on the support and 
help forums (chap.1.2).
arpinux's avatar
arpinux committed
479 480

481 482 483
**Never run terminal tests in administrator mode!!**: some very useful commands 
like "rm" (**r**e**m**ove) allow you to bypass the "wastebasket" principle, but 
could be devastating on the entire system when you are running them in administrator mode.
arpinux's avatar
arpinux committed
484 485 486 487 488 489 490 491 492 493

![Geek girl, by Péhä (CC-BY-SA)](img/geekerieeyes-modarp-220.png) 

### Presentation

Let's simply start with what you see written in the terminal window:

![Terminal presentation](img/terminal_presentation.png)  

- **the user**, its you, or more exactly the one who is logged in and uses the terminal
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508
- **the host name**, is the name of the machine on your local network, a name you entered 
during the system installation
- **the path** is the place where you are currently in the file system (here the 
personal folder '/home/arp/' symbolized by the tilde "~")
- **the prompt delimiter** (symbolized here by the "$" sign) after which you will enter 
in the command line. Its output (or "feed back") will be displayed on the following 
line(s) of the terminal.

The configuration of the full prompt string resides in the '~/.bashrc' (hidden file 
in your personal folder) "bash" interpreter configuration file. The bash program is 
handling the commands entered in the terminal (to make a long story short); 
it enables you to send commands, typed in the terminal, to the computer system in 
order to give it various instructions or obtain some information back.  
Notez que vous pouvez aussi personnaliser graphiquement l'affichage depuis le menu 
"Édition > Préférences".
arpinux's avatar
arpinux committed
509 510 511

### User mode example

512 513
To tame the beast, we are going to start with a simple "cd" (standing for 
"**c**hange **d**irectory"), which let you walk through the system file.
arpinux's avatar
arpinux committed

515 516 517
When you open a Terminal, you are by default in the personal folder of the user 
logged-in (here it is the /home/arp/ home folder). This folder includes the 
sub-folders Pictures, Downloads, etc. 
arpinux's avatar
arpinux committed

519 520 521 522 523 524
To go down into the 'Pictures' sub-folder, I type in the words "cd Pictures" - 
without the quotes - (and the uppercase is of importance here, hence the necessity 
to clearly identify the item names one is looking at...) then I press [Enter] 
to *send* the command. To reach this 'Pictures' folder from anywhere in the file 
system, you need to provide its full path '/home/arp/Pictures' (replace arp by 
your user name):
arpinux's avatar
arpinux committed
525 526 527

![Using "cd" to navigate the file system in the Terminal console](img/terminal_user1.png)

528 529 530
You can see here that, within the command prompt prefix, the path **"~"** has 
been changed to **"~Pictures"**, because you changed the folder you were in, and 
this is exactly like opening a folder with your graphical file manager.
arpinux's avatar
arpinux committed

532 533
However, when you open a folder with the file manager, you "see" all the items in 
there. Within a terminal you need to list the items with the "ls" command:
arpinux's avatar
arpinux committed
534 535 536

![List of existing folders and files with "ls"](img/terminal_user2.png)

537 538
... easy, isn't it ? See, you did not break anything Yes, but you are going to tell 
me that this stuff  is rather useless...
arpinux's avatar
arpinux committed
539 540 541 542 543 544 545

OK, lets move on to cooler commands:

- '**uname -r**' gives the version of the active Linux kernel.

![console : uname -r](img/terminal_user3.png)

546 547 548 549 550
- '**uptime**' gives the current time, since how long the system is running, how 
many users are currently logged in, the system load average for the past 1, 5, 15 
minutes, in order to see if the process waiting list is not too long. If the load 
is over 1 (for old computers) or 2 (for dual-cores and +) this means that one 
process is running while another one is waiting.
arpinux's avatar
arpinux committed
551 552 553

![console : uptime](img/terminal_user4.png)

554 555
- You want to return back in your personal folder ? Just a small and simple 
'**cd**' and you are @home.
arpinux's avatar
arpinux committed
556 557 558 559 560 561 562 563 564

![console : cd](img/terminal_user5.png)

- Your screen is a bit crowded ? A small '**clear**' will empty the console.

![console : clear](img/terminal_user6.png)

### Administrator mode example

565 566 567
To run a command as administrator, Debian uses the command "**su**". You will be 
asked to enter the *administrator password*, and nothing is displayed on screen 
when you type it in. This is done on purpose.
arpinux's avatar
arpinux committed

569 570
Debian can also use "**sudo**" (do as superuser). When using sudo, you will be 
asked, this time, to enter your *own password*.
arpinux's avatar
arpinux committed
571 572 573

![Switch to administrator mode with "su"](img/terminal_root1.jpg)

574 575
You note that the "**$**" sign (the command prompt delimiter), as been replaced 
by the "**#**" sign, indicating the "**root**" administrator account.
arpinux's avatar
arpinux committed

577 578 579
Once connected as "root" in the terminal session, you can launch system 
administration commands, for example here, a package repository update within 
a Gnome terminal, using the command "apt-get update":
arpinux's avatar
arpinux committed
580 581 582

![Terminal in administrator mode: package list update using "apt-get update"](img/terminal_root2.jpg)

583 584 585 586
Look again at this package list update example, that is the retrieval of the 
latest information on packages and potential updates. After the completion of 
this package list update (verifying the repositories), we launch "apt-get upgrade" 
to execute the available updates for the software you have installed.
arpinux's avatar
arpinux committed
587 588 589 590

![Terminal in administrator mode: package upgrade using "apt-get upgrade"](img/terminal_root3.jpg)

On Gnu/Linux, when a process must modify the system, it usually asks you a confirmation.
591 592 593
Here the terminal informs you about the type of the expected changes and wait for your 
agreement, either by simply pressing [Enter] if you accept the default option (here "Yes") 
or by typing "y" to accept or "n" to decline.
arpinux's avatar
arpinux committed

595 596 597
If you accept the changes, you will see the complete process of downloading, configuring 
and installing the concerned packages. Then the terminal will "give the control back to 
you" by displaying the command prompt:
arpinux's avatar
arpinux committed
598 599 600

![Terminal in administrator mode: executing the upgrade](img/terminal_root5.png)

That's it, you just updated your system using the terminal!
arpinux's avatar
arpinux committed

603 604 605 606
The single commands tend to be boring after a while... But then it is a lot more 
fun if you associate several of them together in a 
"[script](" which enables the 
automation of series of processes.
arpinux's avatar
arpinux committed

608 609 610
For more information on scripts, and if you want to "learn the shell", see the 
dedicated page on 
arpinux's avatar
arpinux committed
611 612 613 614

A short summary of the GNU/Linux commands is proposed at the end of this manual (chap.11).

615 616 617 618 619
You must be extremely strict when you send commands in *administrator* mode. To 
avoid errors, use the auto-completion feature. This mechanism allows the computer 
to complete the commands you started typing (3 characters are enough), or their 
corresponding arguments. This is accomplished by pressing on the [Tab] key. 
If several choices are possible, they will be proposed to you as well.
arpinux's avatar
arpinux committed

621 622 623 624
Some applications in graphical mode require the administrator rights. **You should not** 
launch them with **su** or **sudo**, otherwise that might break the graphical session. 
You should use instead the command **gksu** (on *gtk* type desktops) or **kdesu** (for KDE) 
depending on your desktop environment.
arpinux's avatar
arpinux committed
625 626 627

### Launching an "administrator terminal"

628 629 630 631
Like you have seen in the previous section, one uses "**su**" (or "**sudo**") in 
a terminal to enter a command in administrator mode. You can also launch 
directly your terminal in "administrator" mode using a menu entry or the 
application list:
arpinux's avatar
arpinux committed
632 633 634 635

![launching an "administrator terminal"](img/gksuterm.png)

636 637 638 639
Be aware that within this kind of terminal, all the commands entered are executed 
with the "root" account, and in case of mistake or cockpit error, the system can 
become unstable. None of the commands used in this manual requires to be 
identified as "root", except when clearly otherwise indicated.
arpinux's avatar
arpinux committed