Linux Operating System Primer learning

Source: Internet
Author: User
Tags echo command parent directory administrator password fully qualified domain name

Users can link the virtual machine through Xmanager, currently only know two ways to link: one, the SSH command "host name @ Host Physical address attempt to connect, second, the new link host. Both methods require entering the virtual machine by entering the administrator password.

Command prompt format in the command interface: [[email protected] ~]#,root location is the name of the user account currently logged in, this is the administrator mode login, MYLAB11 is called as a non-full format of the computer name, The fully qualified domain name format for the mylab11.xxxxxx.com;~ location is the working directory when the command is executed, also called the current directory; #提示用户类型, #为超级用户root, $ for ordinary users. The virtual Machine interface command is su-xxxx (user name) when logged on to the user.

The shell is an interface that is linked to the operating system kernel for applications that provide the user with an operational interface. The command cat/etc/shells can display yourselves available interfaces, note that here is shells, indicating that there are multiple interfaces. The Echo $SHELL shows the currently used interface, one available and one used.

The program generally contains four types of files, divided into binary files, header files/library files, Help files, configuration files. Binary files are also known as application files, and file formats are mainly EXE, MSI-formatted amounts under the Windows operating system, and in the Linux operating system are mainly elf format files. Header files are also known as library files: generally in the two development of the program when the call is more, Windows has a dynamic link library Dll,linux so (share object shared library), KO (kernel object kernel library), a (static library), Where a static library is a library that is supplied directly to an application call, is not shared. The Help file is written in the entire program's instruction manual, but also need to invest a lot of resources to write a part, can not be ignored.

Command OPTIONS Arguments[parameters],command is the exact name of the action you want to perform, what process to launch, the command to load the binary file into memory, and wait for the CPU to call. Commands are also divided into internal commands, external commands, internal commands are the shell's instinctive operations, commands built into the shell, and external commands are commands that are obtained by installing the application. Differentiate inner and outer commands by type this shell internal command to see whether the command is an internal command or an external command. When the command is invoked, the system caches the command, finds it by executing the path in the path variable when the first call is made, and then, as soon as there is a cache record in the hash table, finds the PATH variable and looks for the cache directly. Options include short options and long options for the features added to the command. The short option format is-X, you can write more than one at a time for example:-a-l-D can also be written as-ald, long option format--word, such as--help,--list, note the long option is not able to merge writing. Arguments becomes the object that the preceding command operates on, some commands can have multiple parameters, but the parameters must be separated by whitespace characters. In writing, options and arguments can be swapped for positions, as well as all components of the command, and are strictly case-sensitive when writing.

When you are unfamiliar with some commands or use failures, you can view the help to understand the use of commands. When viewing commands using Help, be aware that internal/external commands are used, and internal commands view the help command, which uses the man command (known as the Manual Manual) to view the command Help. Content in Help includes ", <> 、...、 | | | Format, "" The content is can be omitted to write,<> content as required content, ... Called there are more options available for operation, | | | For more than one selection.

The Man handbook is divided into nine chapters, each of which includes user commands, system invoke commands, C library function commands, device and special files, configuration file formats, game-related help, Miscellaneous, management commands, kernel-related commands, and the contents of each chapter are progressively deeper. There are also many fields in the manual that explain the name of the program and the related features, the syntax format used by the Synopsis command, the detailed description of the description program, the use of the options option and the detailed description of the meaning, the author information of the author program, The REPORTING bugs report contains bug patterns, examples command usage examples, see also additional references, files related to the program, such as configuration files.

There are other ways to get help: info command can get command of the online Help document, there are many programs to bring in Help documentation, related website site documents information, program Publisher official site, search engine, reference books (Recommended O ' Reiley,wrox, Electronics publishing house).

The Linux operating system uses the hierarchical structure to manage the file, the file system has the unique root node, contains the metadata and the data, the metadata description file property, the data description file content, in the file system, based on the filename reference file, by the name to carry on the access. The file name cannot contain/characters and cannot exceed 255 characters in length, and in the same file, the file name cannot be duplicated and the file name requirement is strictly case sensitive. Use the concept of a path to represent the exact location of a file, which is the hierarchy of directories that must pass when locating the location of a file. The path is also divided into absolute and relative paths, the absolute path is the path to find from the/node, and the relative path is the path to find starting from the current directory. The current directory is available. Express, in addition. Represents the parent directory, which is the top-level directory of the current working directory. Use absolute paths or relative paths depending on the situation. There is also the concept of a home directory, which is the current directory when the user logs on to the system, and also the starting directory for each user.

By practicing the Echo and printf command output, there are some differences, and the echo command recognizes the space ' ' output string with the ' single quote ' in the space. Some options, such as line break operations, should be written as \\n Note two backslashes.

The operating system is also the need to have philosophical ideas exist, recorded under the understanding of the Linux operating system philosophy.

All documents (Linux almost all the resources are abstracted into the form of files, even the hardware, network communications using sockets and pipelines are so), the file is a set of boundaries in the storage device streaming data.

Second, by a number of small functions of a single program, combined together can achieve complex tasks, each small program only do one thing, and to do a good job, as perfect as possible to combine a number of small programs, so that its function to the fullest.

Third, try to avoid direct interaction with users, easy to implement automated tasks in a programmatic manner.

Use plain text file to save the configuration information of the program, so as not to find the data easily.


Linux Operating System Primer learning

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.