From the course: Linux Foundation Certified System Administrator (LFCS) Cert Prep

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Create and configure filesystems

Create and configure filesystems

- [Instructor] To store files and directories inside a partition, first, we need to create a file system on it. By default, Red Hat operating systems use the XFS file system, and Ubuntu uses the ext4 file system. So we'll learn how to work with both. Note that these defaults can change in the future as they've also changed in the past. To format a partition with the XFS file system, the simplest command we can use is this, (keyboard clacking) sudo mkfs.xfs /dev/sdb1. And as you know, /dev/sdb1 is the partition that we're targeting. To create an ext4 file system, we changed the suffix to ext4. Now mkfs comes from the words make file system. Any file system has settings that we can adjust with the commands above the default settings would be used, which are acceptable for most purposes. If we don't want to use the defaults, we can adjust things with some command line options. We can see what file system settings can be changed by reading the command's manual. Now here, I'm typing man…

Contents