How to create a file system on disk partition on Ubuntu 20.04?

Asked 2 months ago (Jan 11, 2021) in the field of Operating Systems by Robert

I have created a Linux partition. Please guide me on how to create a file system in this partition.


Answered 2 months ago (Jan 12, 2021) by Eldernode staff

Dear RobertOnce install a new disk, Ubuntu will access it. To create a Linux file system on the partition, here is an easy way:

 apt install xfsprogs
mkfs.xfs /dev/sdb1 meta-data=/dev/sdb1 isize=512 agcount=4, agsize=524224 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 data = bsize=4096 blocks=2096896, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0

Feel free to ask more questions if you need and find a related guide on: partition ubuntu 20 04 to learn more.

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way


7 days a week, 24 hours a day