Linux learning path: Understanding shell, bash, and shellbash

Source: Internet
Author: User

Linux learning path: Understanding shell, bash, and shellbash
I. shell

The direct controller of computer hardware is the kernel of the operating system. Because of the importance of the kernel, as a user, we cannot directly operate the kernel, therefore, we need shell to call the application or double-click to open the installed application to communicate with the kernel. Shell is equivalent to an interface that connects the program to the kernel. or shell is a desk that provides the necessary office environment for the worker.

Most of today's shells are in the form of command line interfaces. Different operating systems have different shells. Linux uses bash by default.

Because shell is an interface with the kernel, you can control user operation permissions by not giving some user shells, such as/sbin/nologin in/etc/shells. After the user logs on to the terminal, in Linux, a shell is assigned to the user based on the setting of the/etc/passwd file. If the user's shell is assigned as/sbin/nologin (default:/bin/bash) the user cannot log on.

Ii. bash

Bash features advantages:

1. history

Command memory: Record commands that have been executed. After logging out of the system, this operation record is written from memory ~ /. Bash_history. The last operation record can be viewed after the next logon.

2. Press the Tab button to automatically complete the command line

3. alias

Set the alias: alias hsnn = 'LS-al'. Input and execute hsnn. Then, the ls-al command is executed.

4. shell script

Program scripts for easy and convenient System Management

5. Job control, foreground and background control

6. Wildcard (Wildcard)

*_

Iii. built-in bash commands

Bash has many built-in commands: cd umask. You can use the type command to check whether it is a built-in command.

Type-t name

File: External commands

Alias: alias of the command.

Builtin: bash built-in command

When type-p name is an external command, the command path is displayed as which

Type-a name: list all the commands in the PATH that contain name, including alias

 

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.