Self-study Linux Shell5.1-shell parent-child relationship

Source: Internet
Author: User

Click Back to learn the path of the Linux command line and shell script

5.1-shell Parent-child relationship 1 common types of shells
    • Bash is the Linux standard default Shell, which is an abbreviation for the Bunrneagain shell, with a total of 40 internal commands.
    • SH is the abbreviation for the Bourne shell, and SH is the default shell of the UNIX standard.
    • Ash is a shell that consumes the least system resources in Linux and contains only 24 internal commands.
    • Ksh is an abbreviation for the Kom shell, with a total of 42 internal commands.
    • CSH is a Linux-larger kernel with 52 internal commands.

What shell programs The shell enables depends on the individual user IP configuration. You can view the shell program used by the/etc/passwd.

2 shell-son relationship theory

The default interactive shell that is used to log on to a virtual controller terminal or to run the terminal emulator in the GUI is the parent shell
When you enter the/bin/bash command after the CLI prompt or other equivalent bash commands, a new shell is created, which is the child shell

As above, there are two processes when using ps-f for the first time, the process ID of the first process is 34285, the bash shell is running, the process ID of the second process is 34295, the corresponding command ps-f
After entering bash, a child shell appears, at which point the ps-f is executed in the child shell.
The process ID of the first process is 34285, is the parent shell program, the process ID of the second process is 34295, is a child shell program, the process ID of the third process is 39020, the corresponding command ps-f
( note that the child Shell's parent process id/ppid is 34298, which is the PID of the parent shell process) (only part of the parent process environment is copied to the child shell environment when the child shell process is generated)

Child shells can be created from a parent shell or from a child shell

2.1 List of processes

Cond......

Make. Use this command to determine which processes are running and running, whether the process is complete, if the process is zombie, which processes are consuming too many resources, and so on.

Self-learning Linux Shell5.1-shell parent-child relationship

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.