The Linux Learning Trilogy (ii)

Source: Internet
Author: User

New Linux partition and file system

Today, let's talk about building partitions and file systems on Linux. Windows system partitioning can be done with partitioning tools, what about Linux partitions and file systems?

Open SECURECRT, connect to Linux, enter command fdisk-l, can be drawn.

disk/dev/dm-0 doesn ' t contain a valid partition table

Disk/dev/dm-1 doesn ' t contain a valid partition table

The two words mean that the device dm-0 and Dm-1 did not establish a partition. OK, let's enter the following command to set up partitions in dm-0 and dm-1, respectively.

The first command fdisk/dev/dm-0, such as:

As you can see, by entering N again, a new partition is created.

Command (M for help): N
Command Action
E Extended
P primary partition (1-4)
P #建主分区
Partition number (1-4): 1 #分区号为1
First cylinder (1-1019, default 1): #直接回车默认从第一个柱面开始划分
Using Default value 1
Last cylinder, +cylinders or +size{k,m,g} (1-1019, default 1019): +2g #加空间大小, there are a number of options: + rear units can be connected to m,g,k (remember to capitalize) to divide the space you add, It can also be a number of cylinders. Either way, you cannot exceed the remaining space on the disk otherwise it is invalid.

Command (M for help): P #分好后查看分区信息, all that has just been done at a glance.

Immediately following the creation of the extended partition and logical partition:

The input w is saved and then exited, the partition is created successfully. Enter the command fdisk-l view and you can see that the new partition has been created.

The above is the specific steps to create a new partition, let's start by creating a file system in the new partition.

The Linux Learning Trilogy (ii)

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.