Shell 1 Basics

Source: Internet
Author: User

Shell Introduction

The shell is a program written in C and a bridge for users to use Linux. The shell is both a command language and a programming language.
Shell script, a scripting program written for the shell.

Shell Environment
    • The Bourne shell (/usr/bin/sh or/bin/sh) is the first shell used by UNIX and can be used on every UNIX
    • Bourne Again Shell (/bin/bash) Linuxos default, he is the extension of the Bourne shell. is fully compatible with the Bourne shell and adds a lot of features to the Bourne shell. Functions such as command completion, command editing, and command history can be provided. It also contains many of the benefits of the C shell and Korn shell, with a flexible and powerful editing interface, and a friendly user interface.
    • C Shell (/USR/BIN/CSH)
    • K Shell (/usr/bin/ksh)
    • Shell for Root (/sbin/sh)

      First shell script
#shell#test.sh#!/usr/bin/bash echo "Hello World!"

Hello world!

    • #!/usr/bin/bash tells the system to use that shell to execute the script. *
    • echo is used to output text to the window *
Execute shell Script
    • Direct execution, no permissions required
      * * SH test.sh
      * * Source test.sh
    • ./need to give executable permission
      chmod +x./test.sh need to give executable permissions
      ./test.sh use./Execute Script

Shell 1 Basics

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.