A Linux small white, ah haha ... In the future will be their learning experience to share with you! I hope you can point out my mistakes and shortcomings.

Source: Internet
Author: User

Start learning Linux from today! Well... Really is a pure Linux small white 650) this.width=650; "src=" Http://img.baidu.com/hi/face/i_f02.gif "alt=" I_f02.gif "/> Before all the entertainment and learning are carried out under Windows, in the formal contact with the computer (the learning Oh, before purely entertainment 650) this.width=650; "Src=" Http://img.baidu.com/hi/face/i_ F30.gif "alt=" I_f30.gif "/>" Before you know what the operating system will also have a distinction, hey. After listening to the advice and understanding of the great gods, I decided to challenge myself, to learn the use of a new operating system--linux, and to conduct my own programming career in this new environment ...

Well, the nonsense is not much to say (in fact, my mood is still very excited to drop. 650) this.width=650; "src=" Http://img.baidu.com/hi/babycat/C_0004.gif "alt=" C_0004.gif "/>", haha! And I'll share what I've learned today:

(1) Linux differs from Windows:

All the contents of Linux are saved as files, including hardware and so on (all contents are files!). )

Linux is strictly case sensitive (strictly differentiated)

Linux does not differentiate file types by extension (file types are differentiated by permissions):

Then why does Linux still appear

(config file: "*.conf"

Web file: "*.html", "*.php"

Compressed package: "*.gz", "*.bz2", "*.tar.bz2", etc.

Script file: "*.sh"

Binary package: ". RPM")

These are similar to Windows (Note: Just look like!) There is no similarity in the file that looks like file type? We say that these are only for administrators to distinguish between file types, and in Linux by "permissions" to distinguish between file types ("File permissions" This block need to study carefully, and then share their own ideas), Not by the names of these files added. conf,.sh,.html to differentiate the type of file, just make the administrator look convenient, know what type of file it is, and then use a specific method to manipulate the file, our administrator used to use the extension under Windows to distinguish the file, so Linux in order to    "Take care" of the user's feelings, so it allows you to name part of the extension as a custom, these extensions you can not use, but use better (after learning the extension later in detail). Linux does not have the extension of these concepts, remember!

Programs under Windows cannot be installed and run directly on Linux.

(2) Advantages of the character interface:

We are used to doing all kinds of work under Windows, it is also very comfortable with its graphical interface and so on, it is also beneficial to operate and so on, hmm. First of all, I first feel about the Linux interface, OK, start the Linux system, ah ... This what ah, first of all, are English (forgive my english level 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0063.gif "alt=" J_0063.gif "/>", I can not understand anything, although I also know a few English words, but see all English is ...

Hey?   How do not have those beautiful interface Ah, this has what fun, OK quit off! But people sometimes is so curious, haha, after a period of time is really decided to learn Linux, or decided to uncover its mysterious veil ... How do you play it?

1, the character interface occupies less system resources, far less than the graphical interface, if we use more space to set up the graphical interface, it means to use a relatively small amount of space to store resources to the client access. Therefore, we generally do not consider the installation of graphical interface on the server.

2. The character interface reduces the likelihood of errors and attacks, because the more programs you run, the more likely you are to go wrong. (The server is for security, stability and so on, so generally do not consider the installation of graphical interface)

Have you ever felt that using this character interface is very professional, very tall on the look, haha!

(3) Talk about partitioning and formatting of the system partition in which the Linux virtual machine is installed

The concept of disk partitioning: Disk partitioning is the partitioning of several logical sections on disk using the partition editor. Once divided into several partitions (Partition), non-homogeneous directories and files can be stored in different partitions.

Ah ... This as a small white I really do not understand Ah! Listen to Mu class online Tony Teacher's explanation suddenly understand, easy to understand!

First, let's say we have a locker:

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7F/EE/wKioL1cyJMbzrErYAAASZDGeq3M713.png "title=" Qq20160511020835.png "alt=" Wkiol1cyjmbzreryaaaszdgeq3m713.png "/>

Put all the clothes in this cupboard, and then we need to find a hat, wow, big cupboard! A lot of clothes, how to find the hat, ah ... Only one thing turned over, although it must be found in the end, but we have to spend a lot of kung fu, so it is not very wasteful of our energy and time? Just like this hard drive, if we do not do any management of it, put all the files on such a large piece of hard disk, the amount. The files on the hard disk far more than the clothes in our locker, the computer to find the required documents is not very difficult, but also to spend more time, for us will feel very slow ah, inefficient.

So we should think of a way, let us look for clothes in the cupboard is very simple: so, we all think we can first the cabinet to it divided into several areas and then used to put different kinds of clothes, so we later to find their own needs of the clothes is not a lot of convenience?

We would like to compare the hard disk and the cabinet analogy, we can also divide the hard disk into several logical partitions, note that this is only a logical partition, (we can not take the knife hard disk into a few partitions), the partition must have rules:

1, primary partition (Primary): There can be up to four (why four?) This is determined by the hard drive, not the operating system. The hard disk divides itself into equal-sized sectors, 512 bytes per sector, where 446 bytes are used to record boot information, 64 bytes are used for partitioning, and every 16 bytes represents a partition, so there are up to four partitions. There are the remaining 2 bytes, AA and 55 are called Magic Numbers, the BIOS reads the MBR always check that the last is not the two magic numbers, if not is considered to be a non-partitioned hard disk, simply say magic number is to identify whether the hard disk is partitioned)

2, extended partition (Extended): People always do not like to be restricted, that in addition to four primary partitions we also to add more partitions it? Of course. First we take out three of the partition as the primary partition, and then the fourth primary partition as an extended partition, (the primary partition plus expansion partition can only have 4) to a hard disk only one extended partition, the extended partition cannot write data, its main role is to contain more logical partitions, This breaks the limit of only four primary partitions.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/80/80/wKiom1dDC7HTuVAmAAAe9rddQZ8548.png "title=" Qq20160523215404.png "alt=" Wkiom1ddc7htuvamaaae9rddqz8548.png "/>

After partitioning the partitions, can we store the files directly on different partitions?   The answer is of course: no! We first want to format the partition "format (advanced format), also known as logical format, it refers to the user selected file system (such as FAT32, NTFS, EXT3, EXT4, etc.), in a specific area of the disk to write specific data, in the partition to be placed in a file allocation table, Disk space for file management, such as directory Tables ", the fundamental purpose of the format is to write to the file system, the format is specifically what to do (perhaps some people will be as I thought before, formatting is not to clear the data.) It is not correct to say so:

1, first divides the entire partition into the equal size data block (block). The default size of each block is 4KB (can be changed to recognize 1KB, 2KB, etc.), that is, the minimum space to store files, if we have a 10kb file, it is divided into three blocks of data, they must be continuous storage? The answer is not necessarily. The third chunk uses 2KB, and the remaining 2kb can be used? Of course not. This default 4kb is the minimum storage space.

2. Create a two-dimensional table in the list of partitions. How do you find so many pieces of data? To give it a certain rule, is to set up a two-dimensional table in the partition list, record: The file ID number, file modification time, file permissions, data save the location of multiple data blocks, etc. when the user accesses the file, the first to find the partition list, matching permissions, if not match, then directly rejected, if the permissions match , then go in, look for the location of the data block where the data is stored, take the chunks out, and then stitch together the file. (The two-dimensional table is just a temporary draw to the main partition three, does not mean that stored here)

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/7F/wKioL1dDIKWBhc2eAAAtfoZY42A184.png "title=" Qq20160523231832.png "alt=" Wkiol1ddikwbhc2eaaatfozy42a184.png "/>

So the most important format is to write to the file system, for Linux, it writes to the file system mainly dry two things, one, the whole partition into the size of the data block, two, in the partition list to establish a two-dimensional table, which records the ID of each file (actually called I Node (INode)), Modify the time, permissions, file save location.

If we want to partition the cabinet, then the clothes can not be taken out directly to play, it is certainly not, we have to take out the clothes first and then to play partition. As well as partitioning, formatting comes with emptying the original data and then doing the above two operations, but formatting is not meant to erase the data, but to write to the filesystem.

The first time to write a blog haha, back to work, write the process also encountered a lot of things do not understand, adhere to the study of Linux, to answer the current still do not understand these problems. 650) this.width=650; "src=" Http://img.baidu.com/hi/babycat/C_0014.gif "alt=" C_0014.gif "/>



This article is from the "11561636" blog, please be sure to keep this source http://11571636.blog.51cto.com/11561636/1782332

A Linux small white, ah haha ... In the future will be their learning experience to share with you! I hope you can point out my mistakes and shortcomings.

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.