• Zum Inhalt springen
  • Zur Seitenspalte springen

Technik News

Das Blog zu IT, Mobilfunk & Internet

Unix Course: Introduction, Shell Commands – Lecture 1

Juni 6, 2006 von Harald Puhl

The inside of Athena Unix

A. Course Outline
   1. Advanced use of the UNIX shell
   2. The internal workings of the mail system
   3. The notes teleconferencing system
   4. Networking
   5. Distributed File Systems
   6. Security
   7. Kernel
   8. The Ingres Database
   9. System Administration

B. UNIX from the system’s point of view
1. Jobs, Programs and Processes

a. What is a program?

A program is a sequence of instructions or commands which tell the computer how to accomplish a given task.  Under UNIX, this can either be a program which has been compiled, or it may just be a sequence of commands that you would normally issue to accomplish the task.  The latter type of program is often called a shell script.

b. What is a process?

A process is an invocation of a program.  If you run finger twice, each time you ran it, a new process was created.

c. Programs and processes encountered when logging in

1. getty
This process sits watching a terminal until someone  types something.  When someone does, it starts a login process.  Getty runs underneath another process                called init.

2. login
 When login is first called, it is given the username which you typed into getty.  It then asks for your password, checks it, and if correct performs the  steps of logging you in.  These include updating the wtmp and utmp files (Who is loged in), starting a shell (or whatever is listed in you /etc/passwd entry), giving your process the correct groups, and setting ones UID correctly.  If the password was incorrect (or if the user ID is invalid), login will  ask for your user id again.

3. init files
Once your shell has started, it reads several files from which it executes commands.  If you are running the cshell, .login and .cshrc are executed.  If you are running the bourne shell, .shrc and .profile are run.
      
d. What is a job?
The definition of job is not very clear.  In many cases you will see the term used instead of process.  Another common use of the term job is as a „session“.  In other words, everything being done by a given user from a given terminal.

 
2. Programs v. System Calls

One distinction which I want to make clear that is very important in understanding UNIX (or any other operating system for that matter) is the difference between a command and a system call.  A command in UNIX is usually a program which does something.  The command, in turn, executes system calls which actually perform the actions. 

D. The Shell

The following commands are built into the shell.  They are different than must Unix command in this respect since command such as cp and rm are actually separate programs.

1. Shell Commands
. alias    – Declare an alias for a command
. bg       – Run a process in background
. cd       – Change directory
. eval     – Evaluate an shell expression
. exit     – Exit the shell (killing it – must not be login shell)
. fg       – Run a process as your foreground process
. history  – Display recently executed commands
. jobs     – List processes which are children of the shell
. kill     – Kill a process
. logout   – Log out
. nice     – Run a command with a higher niceness     
. rehash   – Reinitialize table of commands
. set      – Set a shell variable
. setenv   – Set an environment variable
. source   – Take commands from a file
. stop     – Stop a process
. suspend  – Stop the shell
. umask    – Set default value for protection
. unalias  – Remove an alias
. unset    – Unset a shell variable
. unsetenv – Unset an environment variable

  • Unix Course: Introduction, Shell Commands – Lecture 1
  • Unix Course: The Shell, and Shell Programming – Lecture 2
  • Unix Course: More Shell Programming – Lecture 3
  • Unix Course: Unix Security – Lecture 4
Klicken Sie hier, um diesen Beitrag zu bewerten!
[Total: 0 Durchschnitt: 0]

Seitenspalte

Tags

3D-Drucker Amazon AOL Apple asus memo pad Blackberry Dell DSL E-Book E-Book-Reader Ebay Elster Facebook Google Google Android Handy Hardware Hotmail IBM Internet Makerbot Microsoft mobiles Internet Netbook Prism Quantencomputer Rundfunkbeitrag Samsung samsung galaxy fame Samsung Galaxy Mega Samsung Galaxy Tab SchülerVZ Skype Smartphone Software sony xperia tablet z Suchmaschine Tablet Tintenpatronen Twitter Typo3 WebOS WhatsApp Xing Yahoo

Technik News Kategorien

Ausgewählte Artikel

LTE tilgt weiße Flecken und drückt aufs Tempo

LTE steht für Long Term Evolution und zugleich für den Vorstoß des mobilen Internets in die erste Liga der Breitband-Internetverbindungen. [...]. Heutige Angebote für mobiles Internet bringen 3,6 oder gar 7,2 MB/sec. Der Zugang erfolgt dabei meistens über einen Internet Stick der dank USB-Schnittstelle sowohl an einem Laptop wie auch am Desktop-Computer verwendet werden kann.


Externe Festplatte mit 3,5 Zoll, 2,5 Zoll oder 1,8 Zoll

Angeschlossen wird die externe Festplatte über USB, Firewire, eSATA oder einen Netzwerk-Anschluss. Vorsicht: Bei manch einer externen Festplatte stört ein lärmender Lüfter. Die kleineren Notebook-Festplatten sind 2,5-Zoll groß. Eine externe Festplatte mit 2,5-Zoll nimmt in den meisten Fällen über den USB-Anschluss Kontakt zum Computer auf und wird über dasselbe Kabel auch gleich mit Strom versorgt.

Inhaltsverzeichnis | Impressum und Datenschutzerklärung