Linux built-in commands

Source: Internet
Author: User
Tags builtin

Main shell built-in commands

The shell has a lot of commands built into its source code. These commands are built-in, so the shell does not have to search for them on the disk and the execution speed is accelerated. Different shell built-in commands vary.

a.2.1 Bash built-in commands

.: Executes the program in the current process environment. With source.

. The File:dot command reads the command from the file and executes it.

: null operation, return exit status 0.

Alias: Displays and creates an alias for an existing command.

BG: Put your homework in the background.

Bind: Displays the current keyword's binding to the function, or binds the keyword to a readline function or macro.

Break: Jumps out of the inner loop.

Builtin [Sh-builtin [args]]: runs a built-in shell command and transmits parameters, returning exit status 0. This command is useful when a function has the same name as a built-in command.

CD [ARG]: Change directory, if no parameters, go back to the home directory, with parameters switch to the directory referred to by the parameter.

Command COMAND [ARG]: Executes the command even if there is a function with the same name. That is, skipping the function lookup.

DECLARE [VAR]: Displays all variables, or declares variables with optional attributes.

Dirs: Displays the directory of the current record (the result of the pushd).

Disown: Deletes an active job from the job table.

echo [args]: Displays args and wraps.

Enable: Enables or disables commands built into the shell.

eval [args]: reads args into the shell and executes the resulting command.

EXEC command: Run commands to replace the current shell.

Exit [n]: Exit the shell with State N.

Export [var]: Make the variable readable by the quilt shell.

FC: History of the Modify command, used to edit history commands.

FG: Put the background work in the foreground.

Getopts: Parses and Processes command-line options.

Hash: Controls the internal hash table used to speed up command lookups.

Help [command]: Displays useful information about the built-in commands. If you specify a command, the details of the command are displayed.

History: Displays a list of command histories with line numbers.

Jobs: Displays the job put in the background.

Kill [-signal Process]: sends a signal to the process specified by the PID number or job number. Enter Kill-l to view the list of signals.

Let: Used to calculate the value of an arithmetic expression and assign the result of an arithmetic operation to a variable.

Local: In the function, limit the scope of the variable to the inside of the function.

Logout: Exit login shell.

POPD: Deletes an item from the directory stack.

PUSHD: Adds an item to the directory stack.

PWD: Prints out the current working directory.

Read [VAR]: reads a row from the standard input and saves it to the variable var.

ReadOnly [var]: variable var is set to read-only and is not allowed to reset the variable.

return [n]: Exit from function, n is the exit status value assigned to the return command.

Set: Sets options and positional parameters.

Shift [n]: Shifts the positional parameter n times to the left.

Stop PID: Pauses the operation of the PID number process.

Suspend: Terminates the operation of the current shell (not valid for login shell).

Test: Check the file type and evaluate the conditional expression.

Times: Displays the cumulative user time and system time that the process started by the current shell runs.

Trap [ARG] [n]: executes ARG when the shell receives a signal n (n is 0, 1, 2, or 15).

Type [command]: Displays the types of commands, for example: PWD is a built-in command for the shell.

Typeset: With declare. Sets the variable and assigns its properties.

Ulimit: Displays or sets the maximum amount of resources available for the process.

Umask [octal number]: User files Create pattern masks for owners, genera groups, and other users.

Unalias: Cancels all command alias settings.

unset [name]: Cancels the value of the specified variable or the definition of the function.

Wait [pid#n]: Wait for the background process with PID number N to end and report its end status.

Linux built-in commands

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.