Linux command line interface

  • Alibaba Cloud  >  Tutorial Center    >  Linux Tutorial  >  Linux Command Line Interface 
  • Linux command line interface
  • Release time: 2018-01-19 Source: Online uploader: User

    Keywords: interface command Linux

    publish an article
  • Abstract: Briefly, Linux operation is very different from Windows. To use the Linux system proficiently, you must first understand the directory structure of the Linux system and master the commonly used commands for file operation, information viewing, and system parameter configuration. Shell is a compiler for the user to interact with the operating system. Without Shell, the user will not be able to interact with the system, and will not be able to use the relevant software resources in the system. Fully understand and use the characteristics of Shell to complete simple to complex task scheduling. Pipeline and redirection are the communication methods between Linux system processes, which play a pivotal role in system management. Briefly describe why the command line mode should first learn how to enter Shell
  • Brief description

    Linux operation is very different from Windows. To use the Linux system proficiently, you must first understand the directory structure of the Linux system and master the commonly used commands for file operation, information viewing, and system parameter configuration. Shell is a compiler for the user to interact with the operating system. Without Shell, the user will not be able to interact with the system, and will not be able to use the relevant software resources in the system. Fully understand and use the characteristics of Shell to complete simple to complex task scheduling. Pipeline and redirection are the communication methods between Linux system processes, which play a pivotal role in system management.

     

    • Brief description
    • Command line mode
    • Why learn Shell first
    • How to enter the command line

     

    Command line mode

    In Linux, we seldom use the graphics mode, why? Because the gods are disdainful. . . O(∩_∩)O~ Generally, Doumen uses the command line mode to perform various operations, because the command line mode executes fast and has high stability. The command interpreter in Linux is Shell, which is why you must understand Shell before using commands.

    Why learn Shell first

    The Linux system is mainly composed of four parts:

    Linux command line interface

    After the user successfully logs in to Linux, the first contact is Shell. Simply put, Shell has two main functions:

    • Provides the interface between users and the operating system for interoperability, which is convenient for users to use the software and hardware resources in the system.
    • Provide a scripting language programming environment to facilitate users to complete simple to complex task scheduling.

    When Linux starts, the kernel is the first to enter the memory, which is resident in the memory, and then the system boots. During the boot process, all the parent processes are started to run in the background, and wait for the user to log in until the relevant system resources are initialized. When the user logs in, the legality of the user is verified through the login process. After the user is authenticated, the relevant Shell is started according to the user's setting, so as to receive the command input by the user and return the execution result.

    The process of a user executing a command:

    User User Command Interpreter Shell Command Interpreter Shell Operating System Operating System Command Results

    There are many kinds of Linux shells, bash (Bourne Again Shell) is the most widely used one, and various distributions generally set it as the default shell in the system. Many Linux systems use Shell as an important system management tool, such as: system startup, shutdown and software management. Other Shells include: C Shell, Korn Shell, Bourne Shell, etc., among which C Shell is named mainly because its syntax is similar to C language, and Bourne Again Shell is an extension of Bourne Shell.

    The graphical interface provided by Linux can accomplish most of the work, and system administrators are generally more accustomed to using terminal command lines for system parameter setting and task management. Various tasks can be completed quickly and conveniently using the terminal command line.

    To use the terminal command line, you need to master some necessary commands. The combination of these commands can not only complete simple operations, but also complete some complex tasks through the Shell provided by Linux. The user enters a string of characters on the terminal command line, and the Shell is responsible for understanding and executing these strings. Then display the results on the terminal.

    Note: Most Shells have the function of command completion.

    In the history of the development of Unix, users have worked through Shell. Most of the commands have been developed and improved for decades, with powerful functions and stable performance. Linux inherits from Unix, and so naturally. In addition, the graphical interface of Linux is not good, not all commands have corresponding graphical buttons. In the case of graphical interface crashes, it is even more necessary to rely on Shell input commands to restore the computer.

    The command itself is a function, a small functional module. If you want the computer to complete very complicated things, you must do it through Shell programming. Commands can be embedded into Shell programs as functions, so that different commands can work together.

    How to enter the command line

    If the desktop version is installed, there are two ways to enter the command line interface: menu method and shortcut key method.

    • Menu method

      There are two commonly used menu methods:

      • Click the right mouse button and select [Open in Terminal].

      • Click [Applications] -> [Tools] -> [Terminal] to open the command line.

      Linux command line interface

      The command line is prefixed with "[Current Username@ComputerName~]$". If it is a root user, it will end with "#". If it is a normal user, it will end with "$".

    • Shortcut key method

      Most Linux versions use the form of Ctrl+Alt+F1 to switch to the command line, and use Alt+F7 to switch back to the graphical interface. If you have another Shift key on the VMWare virtual machine, use the form of Ctrl+Shift+Alt+F1. In the desktop version of CentOS, I tested that these keys are all invalid. Here I need to use Ctrl+Windows key+Alt+F3 to switch to the command line, and use Ctrl+Windows key+Alt+F1 to switch back to the graphical interface.

      Note: Because the default shortcut key for switching between the virtual machine and the host is the Ctrl+Alt key, so when using the shortcut operation with these two keys, try not to press these two keys first, otherwise it will jump out of the virtual machine mode.

  • These are the Linux command line interface of content, more interface command Linux content, please use the top right of the search for information.

Guess you like

Origin blog.csdn.net/weixin_37991107/article/details/84098676