Startertutorials Blog
Tutorials and articles related to programming, computer science, technology and others.
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

Categories: Unix Programming. No Comments on Using Unix and Unix Command Features

In this article you will learn about the basic process of using Unix and the general Unix command features.

 

Using Unix

To use Unix OS, user has to get into the Unix environment. The process of getting into the Unix environment is known as logging in into the system.

 

As soon as the system is booted, a daemon called init gets started along with some other daemons (background processes). This init daemon spawns a process called getty for every terminal. The sequence of events in a complete login process is given below:

 

  • The user enters a login name at the getty’s login prompt on the terminal.
  • getty executes the login program with the login name as the argument.
  • login requests for a password and validates it against /etc/passwd.
  • login sets up the TERM environment variable and runs a shell.
  • The shell executes the appropriate startup files like .profile.
  • The shell then prints a prompt, usually a $ or a % symbol and waits for further input. This indicates successful entry into Unix environment.

 

The above process is illustrated in the figure below. When the user completes the session with the system, he/she comes out of the Unix environment. This process of coming out of the Unix environment is known as logging out.

 

Using Unix: Login Process

 

As soon as the user logs out, the control returns to the init daemon, which in turn spawns a new getty on the corresponding terminal. This facilitates a new user to login to the system.

 

Unix Command Features

Unix has a large number of commands. General features of a Unix command are as follows:

 

  • A Unix command is a program written to perform a specific action. All such programs have a name. So examples are: cat, ls, etc.
  • All Unix commands are written using lowercase letters.
  • Almost all the Unix commands are cryptic.
  • Unix commands can have zero, one, or more number of arguments associated with them.
  • Unix commands can have format specifiers as well as options associated with them. A format specifier is indicated by the + character and option is indicated by – character.
  • Some Unix commands might overflow across the window. In such cases a special prompt in the form of a > symbol in the beginning of the next line.
  • A current Unix command can be killed by using either delete or ctrl-u

 

New commands can be given even when commands are executing in the background. This is not possible with the Bourne shell (sh).

 

For more information on Unix command structure, visit le.ac.uk.

How useful was this post?

Click on a star to rate it!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Suryateja Pericherla

Suryateja Pericherla, at present is a Research Scholar (full-time Ph.D.) in the Dept. of Computer Science & Systems Engineering at Andhra University, Visakhapatnam. Previously worked as an Associate Professor in the Dept. of CSE at Vishnu Institute of Technology, India.

He has 11+ years of teaching experience and is an individual researcher whose research interests are Cloud Computing, Internet of Things, Computer Security, Network Security and Blockchain.

He is a member of professional societies like IEEE, ACM, CSI and ISCA. He published several research papers which are indexed by SCIE, WoS, Scopus, Springer and others.

Leave a Reply

Your email address will not be published. Required fields are marked *