Bash and Shell

Source: Internet
Author: User

Shell

First, the concept

Shell commonly known as shell (used to distinguish from the kernel), refers to the "provide user interface" software (command parser), will receive users ' commands, parse and invoke the corresponding application.

Ii. Categories

1. Graphical interface Shell (graphical User Interface shell is GUI shell)

Example: Windows Explorer (Microsoft's Windows Series Operations series), GNOME (Linux), etc.

2. Command line shell (CLI Shell Interface Shell)

Example: BASH/SH/KSH/CSH (Unix/linux system)

Bash

Bash is a Unix shell written by the GNU program. Its name is a series of writing: Bourne-again Shell (a pun about the Bourne Shell Bourne Again/born Again). Bourne Shell is an early and important shell, written by Steve Bourne around 1978, and released with version 7 Unix. Bash was created in 1987 by Brian Fuk this afternoon.

Bash is the default shell for most Linux systems and Mac OS X. It can run on most UNIX-style operating systems.

Note:

The GNU program, also known as the slave program, was publicly launched by Richard Stallman on September 27, 1983. Its goal is to create a set of completely free operating systems. One of the reasons why Richard Stallman first published the news on the Net.unix-wizard News Group, with the article "the GNU Declaration" and other explanations, was to "recreate the spirit of solidarity that the software community has cooperated in the past year."

Terminal Bash Command basics in MAC OS X

One, $ echo: Output text

$ echo "Hello World"

Two, $ CD: Enter or return a directory

1. Enter the root directory

$ CD/

1. Enter the designated directory

$ CD Bin

2. Return to the upper directory

$ CD.

3. Return to upper level directory

$ CD. /.. /

4. Enter the user directory

$ cd ~

Three, $ ls (single LS displays all files and folders in this level directory, LS + specific records display files and folders in the specific directory)

$ ls

Iv. $ Whereis: Find the path to a program (such as GCC)

$ whereis gcc

Five, $ man: View a detailed description of the command file, exit with the Q-letter key

$ man ls

Six, $ type: Determine if a command is a bash built-in command, or from an external

$ type cd

Display: CD is a shell builtin, which indicates that the CD is a bash built-in command

$ type MySQL

Display: MySQL Is/usr/local/mysql/bin/mysql, indicating that MySQL is from an external program, followed by the path of the program

Seven, cross-line command, Escape command execution key ("\")

When you enter a command that is too long, you can enter "\" before entering enter, and the ">" symbol will appear in front of the next line, and then you can continue to write the unfinished command, for example

$ cd www/wechat \ Enter

Input \ Enter after the next line will appear ">", continue to lose and "/apps"

>/apps

The previous two commands are equivalent to:

$ CD Www/wechat/apps

 

  

Bash and Shell

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.