Shell Note 3

Source: Internet
Author: User
Tags dmesg

    1. Cal Command: Date display

    2. Cat/proc/meminfo: Memory usage Query

    3. Free command: Memory detail Query

    4. Arch command: CPU architecture display

      Displays the architecture of the current system, for example:

      #arch

      x86_64

    5. CAT/PROC/CPUINFO:CPU Information Display

    6. Cat/proc/modules: Query The current system is loaded module


Linux system contains information: File system, kernel module, hardware information, startup parameters and so on.

  1. Proc File system: Accessing system Kernel Information

    (1) proc is not a real file system, does not occupy external memory space, but simply accesses the Linux kernel data provider as a file.

    (2) In this directory, a process that runs on each system in which a digitally named directory corresponds, which is the PID number of the process.

    (3)/proc/filesystems to view the file system types supported by the current system

    (4)/proc/uptime to see when the system is running

    (5)/proc/interrupts can view the current system use of the interrupt number

  2. Modinfo Command: Kernel module information

    (1) Option description for Modinfo command


    Options Description
    -A, author Show Module author
    -D,--description Display Module Description information
    -l,--license Show Module License
    -n,--filename Show module file name
    -p,--parameters Display the parameter information supported by the module
    -v,--version Display version Information
    -h,--help Display Help information
  3. Cat/etc/issue Command: Current release version of the system

  4. Cat/proc/version: View the current version of the system kernel

  5. Cat/proc/partitions: View System Current partition

  6. cat/proc/interrupts command: Display interrupt information

  7. Cat/proc/filesystems command: Common file system Information

  8. DMESG: Start information query

    The DMESG command, which detects and controls the cache of the kernel, is typically used to display the kernel internal cache information at the last boot of the output system.


In the daily work may encounter many need to set their own information, such as system time, hardware clock, kernel parameters, boot boot and so on.

    1. Date command: System time display and settings

      Use the date--help command to see options for the date command

    2. Hostname Command: Host name display and settings for the current system

    3. Hwclock command: Hardware clock display and setup

    4. Hash command: Display, add, or clear a hash table

    5. Sysctl command: Setting the system core parameters


File System Information Display

    1. Echo

    2. Isosize

      Displays the size of the output iso9660 file system.

    3. Minfo command: Display of various parameters of MS-DOS file system

    4. PWD command: Displays the current working directory

    5. ProcInfo command: Display of System state information

    6. Stat command: Display of file/file system details


Operating System Information Query

  1. uname command: Display of operating System information

  2. Vmstat command: Display of statistics for virtual memory

  3. Uptime command: Display of operating information of the system

  4. Locale command: Language settings for the current system

  5. Tload command: System load display

  6. RunLevel command: System run level display


    Run level Description
    0 Shutting down the system
    1 Single-User mode
    2 Multi-user mode, but does not support NFS
    3 Secure Multi-user mode
    4 Keep
    5 Graphical user mode
    6 Restart

    The initial operating level setting of the system is stored in the file/etc/inittab.

    The RunLevel command reads the system's/VAR/RUN/UTMP file, reads the system's RunLevel record, and then outputs the previous and current runlevel, denoted by n if the last system's RunLevel is not recorded.

  7. Lsmod command: Display of all loaded modules


Process Resources

  1. Top command: Process information display


    options
    b batch processing mode
    c
    i Ignore idle process
    s privacy mode
    s cumulative mode
    H Show all threads
    q
    -p pid monitor specified process
    -n iterations
  2. IPCS command: IPC device information display

  3. Time command: Show between Process execution

    CPU time, User time, System time

    [Email protected]:~# time


    Real 0m0.000s

    User 0m0.000s

    SYS 0m0.000s

  4. Pstree command: Display the program in a tree view

  5. PS Command: monitoring process

  6. PMAP command: Displays resource usage information for a program

  7. Jobs Command: Background jobs

    Show jobs that are currently executing in the background

  8. MEV command: Monitor mouse condition

  9. Fuser command: Using a socket or file recognition process

    #fuser-L display list of signals

    #fuser-A/root shows the processes associated with the root directory (including files being used and unused)

    #fuser-K/root kills all processes associated with the/root directory


Linux Terminal command Line operations

    1. Fgconsole command: Displays the current number of virtual terminals

    2. History command: Show historical instructions

    3. Gdialog command: Shell Script Creation dialog box

    4. Yes command: continuous output of string


System administration Commands

  1. sudo command

    The sudo command, which executes the specified command as the other user of the system, can only be executed by the user allowed in the/etc/sudoers file.

    When the user executes the sudo command, they must enter the password before they can obtain the appropriate identity, which is valid for 5 minutes.

  2. RSH command: Remote user settings Login Shell

  3. CHSH command: Shell when switching system login

  4. Clear command: Clears the terminal screen

  5. Rlogin command: Intelligent remote Login

  6. Kill command: End Process

  7. Killall command: Kill a process with the same name

  8. Nice command: Process-priority switch

  9. Pgrep command: Find a process that meets the criteria

  10. PIDOF command: View the process ID of the running program

  11. Renice command: Set process priority

  12. EXEC command: Handing over control

    The EXEC command is used to surrender control after the specified command has been executed. Because control will no longer be handed over to the original shell, you will be logged out.

  13. Init command: Parent process of a process

    The init command is the parent process for all processes, and the init command reads the script from the/etc/inittab file and executes the scripts.

    For example, switch the system to run level 0, which is shutdown mode. #init 0

    For example, to restart the system, the command is shown below. #init 6

  14. BG Command: Background execution program

    For example #bg 3

  15. Wait command: Waits for the program to return status

    The wait command is a shell built-in command that waits for the specified process to end and returns the end status value. If you do not specify a waiting process, wait waits for all processes to end.

  16. Rmmod Command: Delete module

  17. Watch command: repeatedly executes commands

    Executes the specified command repeatedly in full-screen mode and outputs the output to a standard output device.

    #watch-N Ten LS

  18. Sleep command: System hibernation

  19. Suspend command: Suspend execution of Shell


System Maintenance Commands

    1. Export command: Set environment variables

    2. HostID command: Host digital ID

    3. Alias Command: Set alias for command

      #alias p=pwd pwd alias P

    4. Eval command: Multiple commands are executed at the same time

      #eval ls; Pwd

    5. Dircolors: Configuring the LS command display color

    6. Set command: Sets the shell execution mode

      The set command can set how the shell executes, and it can also display and set environment variables through command set.

    7. up2date command: Upgrade red Hat Linux system

    8. Unalias command: Delete the specified alias

    9. unset command: Delete a variable or function


Shell Note 3

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.