Opening presentation
Linux, a very useful feature, which is called Shell scripts.
Shell scripts in development work in my daily also accounted for a very important role in the project in some of the simple tasks we can use Shell script to complete, such as regularly delete the log files script, some automated one-button deployment system scripts and other functions.
So mastering Shell scripting, automation deal with some complicated things will have a multiplier effect. Whether Linux developer or operation and maintenance personnel have the necessary grasp Shell programming.
What is Shell?
Shell is a command interpreter for interpreting a user's operation of the operating system.
This simply means that, Shell will command executed by the user, the translation to the Linux kernel, Linux kernel based on the results of command execution, returned to the user.
View a list of files such as Linux ls
command
[root@lincoding /]# ls
bin dev home lib64 media opt root selinux sys usr
boot etc lib lost+found mnt proc sbin srv tmp var
ls
Execution of simple summarized as follows:
We can simply command, control kernel and operating system, do we want to do a lot of beginners do not take the user to understand the underlying knowledge of Linux, then this is the most important function Shell interpreter.
There are many Shell
can cat /etc/shells
check your Linux system supports Shell, my Linux is CentOs6.5, it supports Shell as follows:
[root@lincoding /]# cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/bin/dash
CentoO6.5 Linux Shell is common and default bash, let's just re-learning bash it.
summary
This chapter briefly introduces the basic concepts of Shell:
Shell is to explain the role of Linux commands entered by the user to the results of the kernel, the kernel will command, returned to Shell, Shell in a presentation to the user.
There are many types of Shell, Shell default for each system are different, CentOs6.5 default Shell interpreter is bash.