Linux shell command

Source: Internet
Author: User

Linux shell command

What is a shell?

The Shell is the interface that connects the operating system kernel to the user.

The terminal is the representation of the shell.

What is Shell programming?

The Shell scripting language, together with the Linux command statement, forms the shell program. The advantage is that batch processing does not have to be manually entered by the user each time.

Bash is one of the shell program interpreters.

Common commands

Pwd:print working directory, print the working directory.

Cd:chang directory, change the working directory.

You can use absolute or relative commands.

Ls:list, view the contents of the catalog. -L to view more information

Clear: Clear the screen.

Echo: The specified string is displayed on the display.

Up and down arrows: historical commands.

Tab: Command Auto-complete.

Commands about disk space

Mount: Mount the file system. This command requires root user rights.

Umount: Removes the file system.

File backup and Compression commands

ZIP is compatible under Windows systems.

Tar: Backup files and directories as a file for easy access.

Shutdown

Shutdown: normal shutdown.

Reboot: Restart.

PS: View program execution.

Top: Review the previous program execution.

Kill: Terminates the process.

Date: Change, view dates.

Cal: Displays the Calendar or annual calendar (Cal 1992).

Authorization commands

chmod: Change file permissions (R-Read W-write X-Execute)

[email protected]:/home/cc# ls-l hi

-rwxrwxr-x 1 cc cc 18 May 16:43 hi

User (U,g,o,a) for CHOMD file (+,-,=) permission name (r,w,x) file

u user G Group O other A All

SU: Switch user. SU User name (if blank, default is root)

Usersadd: Only the root user can add other users

passwd: Change Password

Query and location

The name of the Man:man command, which is used by the system to help with the command. To scroll through the manual page, use page UP or PAGE down.

Locate: Locates files or directories.

Whatis: The meaning of the query command. As a result of Whatis chmod:

[email protected]: ~$ whatis chmod

chmod (1)-Change file mode bits

chmod (2)-Change permissions of a file

File Read command

Head

Tail

Less

More

Commands about the network

Ftp

Ping

Telnet

Netstat


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.