Linux QuickStart 1.1 command-line operations

Source: Internet
Author: User

Http://lovesoo.org/linux-command-line-operation.html

1.1 Command-line operations
Directory:

  • <wp_nokeywordlink>shell Introduction
  • How to use the <wp_nokeywordlink>shell console
1.1.1 Shell Introduction

The shell is the interface between the user and the Linux operating system. There are multiple shells in Linux , with bash being used by default .

The shell of the Linux system provides the user with an interface to use the operating system as the shell of the operating system, which is a command language interpreter with its own built-in shell command set. The shell can also be called by other applications in the system, and commands entered by the user at the prompt are interpreted by the shell and then passed to the Linux kernel.

There are several types of shells in Linux, the most common of which are the Bourne shell (SH), the C shell (CSH and Korn Shell Ksh), and the three kinds of shells.

The Bourne shell is the first shell used by UNIX and can be used on every UNIX type. The Bourne shell is very good at Shell programming, but does not work as well as several other shells in dealing with user interactions. The default shell for the Linux operating system is the Bourne Again Shell. It is an extension of the Bourne shell, called Bash. Fully backwards compatible with the Bourne shell and enhanced by a number of features on the basis of the Bourne shell, it also contains many of the benefits of C shell and KornShell, with a flexible and powerful programming interface with a friendly user interface.

The C shell is a more suitable shell for programming than the Bourne Shell, and its syntax is very similar to that of the C language. Linux provides tcsh for people who like to use the C shell. TCSH is an extended version of the C shell. TCSH includes command line editing of programmable word completion, spelling correction history command substitution, job control, and C language-like syntax. It is not only a prompt compatible with bash shell but also provides more prompt parameters than Bashshell.

The Korn shell aggregates the advantages of the C shell and the Bourne Shell and provides pdksh (an extension of ksh) with the Bourne Shell fully compatible Linux system, which supports task control, which can be suspended on the command line, executed in the background, woken up, or terminated by the program,

The default shell of the Redhat Linux system is bash, which is a prompt for ordinary users and a # for Superuser root, and once the shell prompt appears, you can type the command name and the parameters required by the command.

Let's practice. How the shell works, enter the following command at the shell prompt:

1 $ ls –al

This command lists all files and subdirectories under the current directory.

When a user logs on to Linux, the/etc/passwd file determines which shell to use. For example

The file contains a line similar to the following:

1 myself:x:500:500:Linux User:/home/myself:/bin/bash

The shell used by the user is listed at the end of each row (/bin/bash).

Since bash is the default shell on Redhat Linux, this article will focus on bash and its related knowledge.

1.1.2 ShellHow to use the console

First, we introduce a noun "console ", which is a human-computer interface, such as DOS, that we typically see using the character-manipulation interface. We say that the console command refers to an operating system command that is entered through the character interface. For example, a DOS command is a console command. We need to know now.
is a basic console command based on the Linux operating system.

Linux is a true multi-user operating system, which means that it can accept multiple user logins at the same time. Linux also allows one user to log on multiple times, because Linux, like many versions of UNIX, provides access to the Virtual console, allowing users to log in multiple times from the console at the same time (the system's console is a monitor and keyboard that is directly connected to the system).

The choice of the Virtual Console can be achieved by pressing the ALT key and a function key, typically using F1-F6. For example, when a user clicks the ALT-F2 key after logging in, the user can see the "Login:" prompt, stating that the user sees the second Virtual Console, and then simply pressing the ALT-F1 key to return to the first Virtual Console. A newly installed Linux system allows users to access the first six virtual consoles using the ALT-F1 to Alt-f6 key.

Linux QuickStart 1.1 command-line operations

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.