How to learn the required knowledge in Linux

Source: Internet
Author: User
Tags gz file
After installing the system, I think the first thing to do is to learn how to obtain knowledge and master the learning methods in Unix/Linux. How do you feel isolated and helpless when using Linux one day? you must learn to use man commands.

After installing a Unix/Linux operating system, you do not know what to do with it or what it can do ...... This is the question of most early friends.
In my opinion, the first thing to do is to learn how to get knowledge in Unix/Linux and how to master it. How do you feel isolated and helpless when using Linux one day? you must learn to use man commands.

What is man?
Enter man in the command line and press enter. You will understand the English letters "NAME" and "DESCRIPTION. Man is the command used to display online manuals for Unix/Linux.
In typical cases, man is used to view help manuals for some commands, functions, or files. In addition, man can display gzip compressed files.

What is the online manual for Unix/Linux?
Generally, all resources in Linux are released along with the operating system, including the kernel source code. The online manual is a good user manual for all operating system resources. If you have a command that you don't understand, you can use this command. if you do not use a function when writing a program, you can use this function. even if you don't know a file, you can use this file (of course, this file is generally a configuration file used by the system or a configuration file used by a system service ).

Man manual resource location
Generally, man resources are located under the/usr/share/man Directory. However, if you carefully read man's results and. config is also interested and man. after the configuration, you will understand that the position is determined by the MANPATH variable, you can more/etc/man. config to see where man content is stored.

Composition of a single man resource
Generally, man content is divided into NAME, SYNOPSIS, DESCRIPTION, OPTIONS, see also, and BUGS. NAME is a simple description of the content (generally a definition is like a sentence); SYNOPSIS is a general description of the command syntax, for the function is the definition of the function; DESCRIPTION is a concise DESCRIPTION of the content, which gives you a general impression on the content you are querying. OPTIONS is a detailed explanation of the command parameters when querying commands; see also provides you with some tips, which is equivalent to introducing some reference content. BUGS indicates the BUG in this command or function and reminds you to prevent it from occurring.

Man resource composition

A lot of friends say that man resources are divided into eight chapters. I think this is just the main part. you can see it after reading ls/usr/share/man. man1, man2 ...... There are eight directories like man7 and man8, but there are other directories besides this. What's more, there are other directories specified by MANPATH. Therefore, the specific number of chapters is not fixed, but the roughly identical content in Linux will be stored in the same directory. for example, the man1 and man2 directories are roughly some system commands, man3 is the usage of some functions during programming, man5 is the directory where some configuration file manuals are located ...... There are also some directories in the/usr/X11R */man Directory. Specifically, what is used to separate directories? Different users may have different understandings based on the contents of different directories.

Man resource usage skills

1. if you see an ln.1.gz file in the directory set by the MANPATH variable (for example, in the/usr/share/man/man1directory), you can view the fileame command in man ln.
2. generally, man is used as the man SECTION name, that is, to view the name command or function usage in the specified SECTION. However, if you do not know which chapter a command or function is in, you can view the name manual in all MANPATH settings such as man-a name. By default, man exits after the first manual page is displayed. if The-a parameter exists, all resources are searched.
3. if you think it is too difficult to read in Linux or you are not good at English, you may want to use "XX" or "XX quick translation" to help you, then you can save the man manual as a text file and share it with ftp or samba in windows. Use the following command:
Man | col-bfp> man.txt
I have produced a man.txt file in manmanually. let's look at it with a translation tool.
4. write your own man resources. if you write a very good function or command to add it to the system, for example, you write a MyDate command to display the date in the format you need, you can also write a manual for your MyDate command. You can edit a MyDate File (using vi or any other text editing tool) with instructions on how to use your command. Then, use the gzip mydatecommand to generate a mydate.gz file, then copy the file to the directory specified by a MANPATH, such as cp MyDate.gz/usr/share/man/man2. then you can view your command usage using man MyDate.
5. what can I do after a Linux operating system is installed? Do you want to learn system management? Let's take a look at all the commands in the/usr/share/man1 and/usr/share/man2 directories. you have mastered that you are definitely a system management expert! Want to learn C programming? Run gcc, g ++, gdb, and other commands. Or you can ls the bin directories, such as/usr/bin,/bin, and/sbin, and then execute man in sequence to see what you see.

The biggest resource for learning Linux is on your computer. if you haven't installed it, you must have it on your CD. Want to learn the kernel? Hurry up and check everything in the/usr/src/linux * Directory.

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.