Why Linux? How to install programms with rpm Basic knowledges How to create a VCD How to create a Linux web



DOWNload a copy,
upLOAD an idea

Home Linux

Home chiavedisvolta



Turning on the computer

top First of all: when you turn on the computer, Linux go reading a file in the /etc/ folder, called inittab. In this file is set the runlevel to which will be launched the operative system. Level 0 tells the device to turn off: the computer doesn't start. Level 1 let the computer start in a non-graphic mode (black screen with a control line like [username@computername -]#), for a unique user. Level 2 let the computer start in a non-graphic mode,too, but supports more users; it doesn't support the net. Level 3 is likely the 2, but it supports the net. Level 4 is not utilized. Level 5 (the more utilized one set in default in the most distributions) let the computer start in graphic, multiusers mode and it supports the net. Level 6, at least, give the reboot signal to the device.
Reading this you can understand that in Linux the graphic is a program that can be launched or not. If you have set in your inittab the runlevel 3, you can start the graphic typing:

startx

If you're on runlevel 3 or 5, first thing the device will ask is the login: you must introduce user name and password. In the graphic mode the login is managed by a little program called xdm, that is the first thing Linux go reading if it is launched in a graphic mode. (xdm isn't utilized if the graphic is launched with startx, for, in this case, the login has been done yet).

for the graphic give more problems, I will start my notes referring to the non-graphic environment. If you're in a graphic mode you can follow me opening a graphic terminal (you can do exactly the same thing you can do in the non graphic mode, except... reconfigure graphic!) or pressing Ctrl+Alt+F1, and you will be in a black screen in wich you have to redo the login.

N.B. Typing Ctrl+Alt+F1 the graphic remains open! The startx control will not go! To come back to the graphic screen press Alt+F7.

Control's informations

Top A Linux control can solve the most part of the problems you can have: it is the "man" control, that open the handbook page of every control.
If you try typing

man namecontrol

You will have a page with all the informations on that control's usage. Let's try to launch it in our case: we will have informations on "man" control, so we type:

man man

A page that shows how to use man and its options will appear. To exit this pace simply press "q".

Auto-finishing

Top
It is another useful knowledge. Working on control's line will be boring and too long. Sometimes it will take much time to type a control. Pressing the TAB key Linux finish automatically the control if there aren't other controls starting with the same letters. the auto-finishing works with directory or files name, too. If there are more than one possibility you can press twice the TAB key and Linux give the various possibility.

Example:
If I type:

cdre

and then press TAB, the computer will complete it in "cdrecord". If I type only:

cdr

TAB key doesn't give any result. Pressing it twice I'll have the control's list. In my computer's case:

cdrao cdrecord

The same thing happens for the directory: if I want go in the directory i'm working in I should type:

cd /home/marcello/documenti/chiavedisvolta

and that's not too convenient. Using TAB i ahve to type:
/h (TAB) /m (TAB) /D (TAB) /c (TAB)

having the same result with 12 typing instead of 39!

An advice:
for this reason is better to give to the directories in the same folder names beginning with the same letter. In other case you have to type more than one letter.

WARNING:
Linus is case sensitive, in other words it distinguish capital letters from small ones. "Documwents" directory, for example, is different from the "documents" one!


Files' list
Top
A very useful order is "ls", which gives in outcoming the directory's contents' list from which it is launched. You can launch ls with "-l" option to have more contents' informations (as permissions, owner, etc.). A useful option is "|more" o "|less", that is similar, but with some functions added. With them you can visualize the contents page after page. To esc the visualization (when using less or more), simply type "q". Similar to ls is dir.

Processes' management

Top

Linux never get jammed... Thi does not means that some processes (as a bad-installed program o a "bugged" one) can't jam.
If this is the case you have to find the process and kill it. You can do it in many ways. One is launching the order:

ps

that show the running processes. It is useful to launch it with the -A option, in order to have the all processes' list:

ps -A


In outcoming we will have the processes' list with their PID, in other words their identificative number. (It is advisable to use ps with |more, too). If, for example, StarOffice has get jammed, ps will give us in outcoming something like this:

4100 ? 00:00:00 run-mozilla.sh

4105 ? 00:01:13 firefox-bin

4123 ? 00:00:00 netstat

4191 ? 00:00:12 soffice.bin

soffice has the 4191 PID. At this point you can kill it to resolve the problem:

kill -9 4191

Another way could be top.

top

Give in outcoming the processes' list, but differently from ps can be used in an interactive mode. For example pressing Shift+a, the list will be ordered for age. In this way you can visualize the most recent process first. Pressing shift+u and typing an user's name, you can visualize only the processes owned by a particular user. Pressing the "k" key followed by the PID number, you can then close it. top will ask with what signal it has to close the process. Put in 9.

Adding floppy, cd, usb devices or parts of the hardisk

Top

Using the editor vi

Top


Users

Top

Linux is a multiuser system (really! Not like Windows). There is an administrator user (root) and a x nuymber (min. 1) of normal users. Root can do every operation (included deleting other users), while a normal user, depending on the permissions' configuration, has limitations (usually he can't delete other user's files, or change the system's configurations).

With the order:
useradd [options] username

you add a user to the system. With:

userdel [options] username

you delete a user.

To pass from a user to another it isn't necessary to restart the machine: from the console type:

up username

and you will pass to another user.

If the "up" order is launched by the root's user the password won't be asked. In other case the password will be required. If you want to pass change a normal user to the root one you have only to type:

up

that is the same as

up root

To load also the user's path, to have then the same possibilities you will have doing the login with his name, you have to type:

up - username

or, to became the root, simply:

up -