Linux Bash Command Bash脚本命令



    Create an alias  

  apropos  Search Help manual pages (man -k)  

  Search for and install software packages (Debian)  

   Spell Checker  

      Find and Replace text, database sort/validate/index  


  bash     GNU Bourne-Again SHell   

       Arbitrary precision calculator language   

       Send to background  

    Exit from a loop  

  Run a shell builtin  

    Compress or decompress named file(s)  


      Display a calendar  

     Conditionally perform a command  

      Display the contents of a file  

       Change Directory  

   Partition table manipulator for Linux  

    Change group ownership  

    Change access permissions  

    Change file owner and group  

   Run a command with a different root directory  

 System services (runlevel)  

    Print CRC checksum and byte counts  

  clear    Clear terminal screen  

      Compare two files  

     Compare two sorted files line by line  

  Run a command - ignoring shell functions  

 Resume the next iteration of a loop  

       Copy one or more files to another location  

     Daemon to execute scheduled commands  

  Schedule a command to run at a later time  

   Split a file into context-determined pieces  

      Divide a file into several parts  


     Display or change the date & time  

       Desk Calculator  

       Convert and copy a file, write disk headers, boot records  

 Data recovery tool  

  Declare variables and give them attributes  

       Display free disk space  

     Display the differences between two files  

    Show differences among three files  

      DNS lookup  

      Briefly list directory contents  

 Colour setup for `ls'  

  Convert a full pathname to just a path  

     Display list of remembered directories  

    Print kernel & driver messages   

       Estimate file space usage  


     Display message on screen  

    Search file(s) for lines that match an extended expression  

    Eject removable media  

   Enable and disable builtin shell commands  

      Environment variables  

  ethtool  Ethernet card settings  

     Evaluate several commands/arguments  

     Execute a command  

     Exit the shell  

   Automate arbitrary applications accessed over a terminal  

   Convert tabs to spaces  

   Set an environment variable  

     Evaluate expressions  


    Do nothing, unsuccessfully  

 Low-level format a floppy disk  

    Partition table manipulator for Linux  

       Send job to foreground   

    Search file(s) for lines that match a fixed string  

  file     Determine file type  

     Search for files that meet a desired criteria  

      Reformat paragraph text  

     Wrap text to fit a specified width.  

      Expand words
, and execute commands
  format   Format disks or tapes  

  free     Display memory usage  

     File system consistency check and repair  

  ftp      File Transfer Protocol  

 Define Function Macros  

    Identify/kill the process that is accessing a file  


     Find and Replace text within file(s)  

  Parse positional parameters  

     Search file(s) for lines that match a given pattern  

   Print group names a user is in  

     Compress or decompress named file(s)  


     Remember the full pathname of a name argument  

     Output the first part of file(s)  

  Command History  

 Print or set system name  


       Print user and group id's  

       Conditionally perform a command  

 Configure a network interface  

   Stop a network interface   

     Start a network interface up  

   Capture an X server screen and save the image to file  

  Copy files and set attributes  


     Join lines on a common field  


     Stop a process from running  

  killall  Kill processes by name  


     Display output one screen at a time  

      Perform arithmetic on shell variables  

       Make links between files  

    Create variables  

   Find files  

  Print current login name  

   Exit a login shell  

     Display lines beginning with a given string  

      Line printer control program  

      Off line print  

  lprint   Print a file  

  lprintd  Abort a print job  

  lprintq  List the print queue  

     Remove jobs from the print queue  

       List information about file(s)  

     List open files  


  make     Recompile a group of programs  

      Help manual  

    Create new folder(s)  

   Make FIFOs (named pipes)  

  mkisofs  Create an hybrid ISO9660/JOLIET/HFS filesystem  

    Make block or character special files  

     Display output one screen at a time  

    Mount a file system  

   Manipulate MS-DOS files  

       Move or rename files or directories  

      Mass Move and rename (files)  


  netstat  Networking information  

     Set the priority of a command or job  

       Number lines and write files  

    Run a command immune to hangups  

 Query Internet name servers interactively  


     Open a file in its default application  

       Operator access   


   Modify a user password  

    Merge lines of files  

  pathchk  Check file name portability  

     Test a network connection  

    Stop processes from running  

     Restore the previous value of the current directory  

       Prepare files for printing  

  printcap Printer capability database  

  printenv Print environment variables  

   Format and print data  

       Process status  

    Save and then change the current directory  

      Print Working Directory  


    Display disk usage and limits  

 Scan a file system for disk usage  

 Set disk quotas  


      ram disk device  

      Copy files between two machines  

     read a line from standard input  

 Mark variables/functions as readonly  

  reboot   Reboot the system  

  renice   Alter priority of running processes   

  remsync  Synchronize remote files via email  

   Exit a shell function  

      Reverse lines of a file  

       Remove files  

    Remove folder(s)  

    Remote file copy (Synchronize file trees)  


   Multiplex terminal, run remote shells via ssh  

      Secure copy (remote file copy)  

    Merge two files interactively  

      Stream Editor  

   Accept keyboard input  

      Print numeric sequences  

      Manipulate shell variables and functions  

  sftp     Secure File Transfer Program  

    Shift positional parameters  

    Shell Options  

 Shutdown or restart linux  

    Delay for a specified time  

  Find files  

     Sort text files  

   Run commands from a file `.'  

    Split a file into fixed-size pieces  

      Secure Shell client (remote login program)  

  strace   Trace system calls and signals  

       Substitute user identity  

     Execute a command as another user  

      Print a checksum for a file  

  Make a new name for a file  

     Synchronize data on disk with memory  


     Output the last part of files  

      Tape ARchiver  

      Redirect output to multiple files  

     Evaluate a conditional expression  

     Measure Program running time  

    User and system times  

    Change file timestamps  

      List processes running on the system  

 Trace Route to Host  

  trap     Run a command when a signal is set(bourne)  

       Translate, squeeze, and/or delete characters  

     Do nothing, successfully  

    Topological sort  

      Print filename of terminal on stdin  

     Describe a command  


   Limit user resources  

    Users file creation mask  

  umount   Unmount a device  

  Remove an alias  

    Print system information  

 Convert spaces to tabs  

     Uniquify files  

    Convert units from one scale to another  

    Remove variable or function names  

   Unpack shell archive scripts  

    Execute commands (until error)  

  Create new user account  

  Modify user account  

    List users currently logged in  

 Encode a binary file   

 Decode a file created by uuencode  


  v        Verbosely list directory contents (`ls -l -b')  

  vdir     Verbosely list directory contents (`ls -l -b')  

       Text Editor  

   Report virtual memory statistics  


    Execute/display a program periodically  

       Print byte, word, and line counts  

  Report all known instances of a command      

    Locate a program file in the user's path.   

    Execute commands  

      Print all usernames currently logged in  

   Print the current user id and name (`id -un')  

  Wget     Retrieve web pages or files via HTTP, HTTPS or FTP  

    Send a message to another user   


    Execute utility, passing constructed argument list(s)  

      Print a string until interrupted  

        Run a command script in the current shell  

      Comment / Remark