UNIX System Management: Shell Basics

Source: Internet
Author: User
Keywords UNIX System Management
Tags applications basics design developed environment environment variables etc functions

To complete this chapter, you can do the following things:

Understand how the shell works

Describes the process of user logon

Describes the capabilities of user environment variables and these environment variables.

Set up and modify shell variables.

Understand and modify some special environment variables such as path, term, etc.

Customizing user environment variables for specific applications.

6.1 What is a shell?

The shell is an interactive command interpreter. Shell is independent of the operating system, and this design gives users the flexibility to choose the shell that suits their needs. The shell allows you to type a command at the command line, which is interpreted by the shell and transmitted to the operating system (kernel) for execution.

This chapter describes the characteristics of the interaction provided by the POSIX shell.

The following is a summary of the shell features:

Find the location of the command and execute the associated program

Assigning a new value to a shell variable

Execute command Override

Handles I/O redirection and piping functionality

Provides an interpretive programming language interface, including statements such as tests,branches and loops

When you log on to a UNIX system, the shell defines some features for your terminal login trail and then appears with your prompt. The $ symbol in the Posix,bourn,k shell is the default prompt. The default prompt in the C shell is the% number.

6.2 Some commonly used shell

/usr/bin/sh POSIX Shell

/usr/bin/ksh Korn Shell

/usr/old/bin/sh Bourne Shell

/USR/BIN/CSH C Shell

/usr/bin/keysh A contest-sensitive softkey Shell

/usr/bin/rksh restricted Korn Shell

/usr/bin/rsh restricted Bourne Shell

The POSIX shell is a POSIX-compliant command programming language and command interpreter. It can read from a terminal or a file and execute commands. POSIX is similar to the Korn shell in many ways. There are historical mechanisms. Supports task control and other useful features.

The Korn shell is very similar to the POSIX shell, developed by the http://www.aliyun.com/zixun/aggregation/16482.html ">david Korn of Bell Laboratories.

Bourne Shell: Lacks many features in POSIX, and Korn shells. It was developed by Stephen R. Bourne, the first shell to be used in At&t Unix

C Shell. is a common language interpreter, has a command history mechanism, similar to the syntax of C language. and task control tools. It was developed by William Joy of University of California at Berkeley.

Rsh and Rksh are restricted versions of the Bourne Shell and Korn shell. Restricted shells have more restrictions than the common shell when setting logins and environments. Restricted shells are used like standard shells with unusual behavior.

Users who use restricted shells cannot:

Change Directory

Reset the value of the PATH variable

Use/symbol in path name.

REDIRECT output.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.