"Linux learning is not difficult" file system Management (3): Creating a file system in a Linux system

Source: Internet
Author: User

18.3 "Linux learning is not difficult" File System Management ( 3 ): In Linux creating a file system in the system

use the MKFS command to create various file systems on a partition. the MKFS command itself does not perform the work of establishing the file system, but rather calls the relevant program to execute it. The file system here is to be specified, such as xfs,ext4,ext3,vfat, or msdos .

Command syntax:

MKFS [ options ] [ devices ]

The meanings of the options in the command are as shown in the table.

options

option meaning

-t < file system type ;

Specify file system type

-V

Show more information

Example: Creating an XFS file system for a/DEV/SDA5 disk partition .

[[email protected] ~]# mkfs -t xfs /dev/sda5meta-data=/dev/sda5               isize=256     agcount=4, agsize=6553600 blks         =                         sectsz=512   attr=2, projid32bit=1          =                        crc=0        finobt= 0data     =                        bsize=4096   blocks=26214400,  imaxpct=25         =                        sunit=0       swidth=0 blksnaming   =version 2               bsize=4096   ascii-ci=0 ftype=0log       =internal log            bsize=4096   blocks=12800, version=2          =                        sectsz=512   sunit=0 blks, lazy-count=1realtime = none                    extsz=4096 &nbSp; blocks=0, rtextents=0 

of course, you can format the disk partition into other file system types. For example, you can format /dev/sda5 as Ext4,ext3, or vfat file system types.

Example: Format the/DEV/SDA5 partition and create a ext4 file system.

[Email protected] ~]# mkfs-t EXT4/DEV/SDA5

Example: Format the/DEV/SDA5 partition and create a ext3 file system.

[Email protected] ~]# mkfs-t EXT3/DEV/SDA5

Example : format The/DEV/SDA5 partition to create the VFAT file system.

[Email protected] ~]# mkfs-t VFAT/DEV/SDA5

Notes:
You can also useMKFS.XFS,MKFS.EXT4,Mkfs.ext3,mkfs.ext2,Mkfs.msdos,Mkfs.vfatcommand to create different file systems on the disk partition.

This article extracts from "Linux Learning is not difficult" textbook, which is one of the most practical, theoretical and practical Linux Introductory materials.


"Linux learning is not difficult" file system Management (3): Creating a file system in a Linux system

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.