Linux operating system Getting Started Basics Tutorial 1

Source: Internet
Author: User
Tags pears

Chapter One basics of Linux

Hard disk

A hard disk is a medium that can store a large amount of information resources. We usually see the hard disk is square a very heavy iron box, but in fact, the hard disk is round, plus some control circuit, in order to facilitate portability and design into a square shell. But the hard disk is really round, do not deceive you, to not be called disk it ? Second, you need to know that the hard disk can be partitioned. Can partition the hard disk into a number of partitions, it seems that the partition is a position is also a verb. What is the partition of rank ? Now the hard drive is getting bigger and more and more resources are being stored. In order to better manage the use of hard disk resources, more efficient query speed and quality of access, we can divide the hard disk into a number of partitions, storing some information separately. When you need to read a certain data, the system will automatically use the nearest head to read, speed up the reading speed. Hard disk Partitioning is a means of rational management of resources on the basis of hardware.

The partition already knows, but we can't only partition Ah, we have to use a method to control the partition. The Windows operating system uses the concept of drive letters, using a single letter to represent different partitions on the hard disk, such asC-drives, D-drives, andso on. before Windows2000, theC disk corresponds to the first partition, theD disk corresponds to the second partition, and so on. By the Winows2000, the correspondence can be adjusted on its own.

In Linux, we don't have the concept of a drive letter, we manage it in the form of a directory.

In order to ensure the integrity of the article, simply say the catalogue it, in fact, we are very clear. Wouldn't it be hard to find the tens of thousands of fruits in a basket ? But if we put apples in a basket called apples, put the pears in a basket called pears ... Does this greatly simplify the speed at which we are looking for a specified fruit ? If these fruits are our files, then the basket we use is called the catalogue. New problems arise, even if the peach is thrown in a basket called peaches, it is still difficult to find from the good thousands of peaches from Chengdu, Sichuan Longquanyi Peach. Smart you must think of the peach in the basket and then put a lot of called Sichuan Ah, Hebei, Guangzhou ah these names of the baskets, the different origin of the peach put in. Yes , that's it! we can create a new file directory under a file directory and manage the files very carefully. Here you understand what is called the directory, but also understand that the directory can be nested, this is okay. Directory technology is a method of managing resources on the basis of software.

Back to Linux for the management of the hard disk: In Linux, we do not have the concept of disk, we use the form of directory management. Each partition and a directory corresponding to the operation of this directory in the future is the operation of this partition, so that the hardware management tools and software directory management tools to unify. This process of partitioning and directory is called Mount -mount. This correspondence can be interrupted and changed by the user at any time.

  Swap swap partition

Knowledge of partitioning we are already familiar with the need to mention the swap partition. If we don't have enough memory, we may not be able to run some large-scale software, and the solution is to carve an area on the hard disk as temporary memory, as if the memory is getting bigger. the Windows operating system calls this area virtual memory, whichLinux calls swap partition swap. Although the hardware price of the decline in memory has not been very limited to us, but the concept of the swap partition is retained, and there is the reason for continued retention, of course, the issue of the kernel, we do not discuss much, we have to explain that when the installation of Linux when the swap partition, if your memory only 64M or 128M, then the swap partition is best set to become it 3 times times, if your partition is large enough, there is 256M or 512M, then the same size is set to be. Note, however, that a number with an N-Power of size 2 is preferable .

Partition format

Today said a lot of hard disk-related problems, but also to add one, is the partition format. Hard drives are just a medium for recording information in an electromagnetic way, and we can manage them in different formats. Different operating systems choose different formats, and the same operating system may support multiple formats. Microsoft's operating system chose the FAT16 format as the DOS partition format, Windows95 and WINDOWS98 support FAT32 format,windowsnt use NTFS4 format , Windows2000 and XP support NTFS5 and FAT32, but they do not support the common partitioning format on Linux. Linux is an open operating system that initially uses the ext2 format and later uses the ext3 format, but it supports a very large number of partition formats, including many of the XFS formats used on mainframe UNIX , as well as those of Microsoft fat and NTFS format.

You need to specify the partition format to use when partitioning your hard disk.

Mastering The directory structure of Linux

Now that the directory is used to facilitate file management tools, what kind of files are stored in different directories under Linux ?

Directory name meaning

  /bin common commands for Linux in this directory , in some versions the same directory as the root directory.

  /boot This directory is stored in the system to use the program when booting, when using lilo to boot Linux, will use some of the information here

  /dev The directory contains all the external devices used in the Linux system, and it is actually a port that accesses these external devices, and you can access these external devices without distinction from accessing a file or a directory. For example, by typing "Cd/dev/cdrom" in the system, you can see the files in the optical drive, and type "Cd/dev/mouse" to see the relevant files of the mouse.

  /cdrom This directory is empty when the system is just installed, you can hang the optical drive file system in this directory, for example "Mount/dev/cdrom/cdrom"

  /etc The directory contains various configuration files and subdirectories to be used in system administration, such as network configuration file, file system,x system configuration file, device configuration information, setting user information, etc.

  /sbin This directory is used to store system administrator's system management program.

  /home If a user named "XX" is established, then there is a corresponding "/home/xx" path in the/* directory to hold the user's master directory.

  /lib This directory is used to store system dynamic connection shared libraries, almost all applications will use the shared library in this directory

  /lost+found the directory is empty in most cases. However, some files are temporarily stored here when there is a sudden power outage or an abnormal shutdown.

  /mnt The directory is also empty in general, you can temporarily hang other file systems in that directory.

  /proc can obtain system information in this directory, which is generated by the system itself in memory.

  /root If you are logged in as a superuser, this is the Superuser's home directory

  /tmp is used to store temporary files generated when different programs are executed

  Many applications and files for the/usr user are stored in this directory

  Hardware supported by Linux

In general,Linux for hardware support has three words summed up: the more new hardware more difficult to support, the smaller the manufacturers of products more difficult to support, more and more hardware is supported !

So we recommend the use of well-known manufacturers of mature products.

In the next chapter we will describe the installation of Linux. Our choice of Linux distribution is Redhat Linux 7.3, before installing please be sure to familiarize us with the knowledge of the hard disk partition we introduced.

Linux operating system Getting Started Basics Tutorial 1

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.