Title:

A free Basic UNIX-training with muLinux

Home
deutsch
  
ISBN: 3453181794   ISBN: 3453181794   ISBN: 3453181794   ISBN: 3453181794 
 
  Wir empfehlen:       
 
[Back] [Home] [Forward]       http://rowa.giso.de  

A free Basic UNIX-training with muLinux

Notes: This Text is roughly translated (German to English) by a translating program. Sorry, but I have not time for the translation. Maybe you can do this?

Configuration Skripts, Dotfiles

People who use DOS, knows the files CONFIG.SYS and AUTOEXEC.BAT. These files are processed when starting of the system. CONFIG.SYS is particularly responsible for merging the necessary drivers for the hardware, during AUTOEXEC.BAT more the working environment adjusts. Unix is naturally substantially more complex as multi-user operation system and it becomes when starting substantially more files (/etc) processed.

Now however each user in the system wants to use its own adjustments. For this reason exist the dotfiles in its homeland directory serve. Point data file names begin with one point ( .*) and user adjustments for certain applications contain. Standard-log-in-brightly also an application is and becomes by the file profile preset. In order to be exact: There are several Shells, which over different dotfiles are configured. For the sake of simplicity we treat only the given Shell. To the memory: The Shell worries about communication with the user by means of the university X-commands liked in such a way.

So now we want to look at ourselves times these dotfiles. So far we had not ever seen it. The instruction ls doesn't this display? Correctly! These files are hidden! All files with one point at the start are not displayed normally. There is to a certain extent x-files (however not quite so boring). We must in addition ls with the option -a call. Then all files are displayed.

/# ls -a

Yes, but we see nevertheless no dotfiles! The problem is, it gives under muLinux no dotfiles! We must create ourselves our own point data files. Thus again a function for us and our loved vi .

The dotfile .profile

This file will be called by the standard shell bash when logging in called and processed. This file must be in the home directory of the user. The home directories are normally situated as sublists in the directory /home. We are now however the user root. We must therefore our file profile in the directory /create. One should not do this otherwise.

/# cd /
/# vi .profile

date
~
~
~
~
~
~
~
        

When logging in thus the current date is to be displayed. We store this file and test these by logging in on another console (e.g. also Alt + F2). The date would have to be displayed now.

Now we can see also the file.

/# ls -a

One knows by the way also the options of LS combine:

/# ls -la

We can add another beautiful message and simulate a DOS-Prompt. For example:

/#  vi profile

date
echo "Have a lot of fun!"
PS="C:\>"
~
~
~
~
~
~

We have to naturally again log in, in order to see the modification.

The file .profile is thus a script file, which is called when logging in. One can enter here instruction and variable definitions, which are executed automatically.

Who wants to again use the file, she must naturally store on the work diskette.

The File /etc/profiles

The dotfiles are situated thus in each home directory and can be processed thus also by the respective user. Now Unix is not Unix, if not more certainly root have the control of everything has. If it concerns to give defaults for all users there must be in addition a file, which may change only our waiter Mufti. This file is called /etc/profiles.

We look at ourselves times this file.

/#  cd /etc
/#  less profiles

Surely we are something confused over the many things there in it are now. Everything was described in the paragraph " simple shell Skripte ". First some shell variables are assigned here.
TERM defines the type of display. This is usually linux .
PS1 is the Shell prompt
PS2 Secondary prompt for interactive shell Skripte (in addition it wiil come later)
ingoreeof meaning has only if the Shell runs interactively. At the value 10 each EOF character (end to OF file) leads to leaving the Shell.
PATH Paths to the executable programs. This variable gives it also for DOS. Here the separation of the directories with a colon takes place.

Then this variables become also export as generally accepted variables explains. That is, this variables apply also to the child processes.

Then a query comes whether with this diskette is for the first time gebootet. This takes place with the conditional request if... fi :

if [ condition ];  then
   call these commands
fi

If the condition applies, then call the commands up to fi. We will concern ourselves later with these possibilities of shell script programming.

Here thus the instruction becomes with first boats welcome executed. You can start these also by hand. welcome outputs the greeting information. welcome is by the way also a shell script and can also less are regarded. In addition one must it only also find with which.

Further become in the file /etc/profiles the colours for the display output defines. We define these however with muLinux with the instruction setup - f misc . We must have all thing in addition a color monitor.

/# setup -f misc 
DO you want some miscellaneous setting?: y
Enter MY_BOOKMARKS: ... [Enter]
Enter LISTING [multi column] > colored
Enter LYNX_LISTING: ... [Enter]
Do you want Shell history? [y]: ... [Enter]
Do you want push/pop support into the shell (y/n)? [Enter]
Enter TIMEZONE [ +0 ]: ... [Enter]
Enter SIGNATURE: ... [Enter]
Enter Editor [elvis]: [Enter]
Enter WINDOW_MANAGER [ fvwm95 ]: ... [Enter]
This terminal support colors (TRUE/FALSE)? TRUE

Now the command ls shows a colored listing. Directories are e.g. blue represented.

/# ls

a       cdrom   home    mnt     root    setup   tmp
bin     dev     lib     nfs     samba   startup usr
c       etc     linuxrc proc    sbin    swap    var

If we are content thereby, we store the configuration.

/# setup -s tutorial01

The color values become with muLinux in the file /etc/color stored. Into the file /etc/colors.conf TRUE is entered. Both files become of /etc/profiles analysed.

In the end of the file /etc/profiles the program fortune will be called. Thus a wisdom appears when each logging in. Unfortunately I do not understand these. Who wants to do without these messages, put a # at the begiining of this line. Or you can put your own wisdoms in the file /usr/game/lib/fortune.db.

Note: In the "right" Unix or Linux become in the file /etc/profiles preset rights of access with the command umask determined. Likewise leave themselves also ulimit max. storage areas for processes which can be started from the user assign.

[Back] [Home] [Forward]      
Robert.Warnke@giso.de (copyleft) Robert Warnke, Berlin (Germany) - You can write me in English. | http://rowa.giso.de
  
Markt & Technik bei Heyne, Bd.87, Linux (Broschiert)
von Marc A. Selig
Sonstige Artikel:
Loriot - Gesammelte Werke aus Film und Fernsehen (6 DVDs)
von Evelyn Hamann
Saved (Methuen Modern Plays) (Taschenbuch)
von Edward Bond
Magister Negi Magi - Vol. 5
von Nishikiori Hiroshi
 
    
     

Back to the topic site:
StudyPaper.com/Startseite/Computer/Informatik

External Links to this site are permitted without prior consent.
   
  Home  |  deutsch  |  Set bookmark  |  Send a friend a link  |  Copyright ©  |  Impressum