1 00:00:06,750 --> 00:00:09,360 - In this lesson, you will learn how to create file systems 2 00:00:09,360 --> 00:00:11,940 on the partitions that you have just created. 3 00:00:11,940 --> 00:00:14,670 Some operating systems do that automatically. 4 00:00:14,670 --> 00:00:16,770 On Linux that's not the case. 5 00:00:16,770 --> 00:00:18,840 In order to do something with the partition, 6 00:00:18,840 --> 00:00:21,323 you need to create a file system on top of it. 7 00:00:22,170 --> 00:00:24,990 File systems are the solution that are required 8 00:00:24,990 --> 00:00:27,360 to store files on partitions 9 00:00:27,360 --> 00:00:31,470 and the generic file systems on Linux are XFS and Ext4. 10 00:00:31,470 --> 00:00:34,560 You will mainly find Ext4, XFS is popular 11 00:00:34,560 --> 00:00:36,420 in a Red Hat environment. 12 00:00:36,420 --> 00:00:38,130 There's also a Btrfs 13 00:00:38,130 --> 00:00:40,710 You should pronounce it as butter-F-S 14 00:00:40,710 --> 00:00:43,170 That's a relatively new file system 15 00:00:43,170 --> 00:00:45,690 that's available on some distributions. 16 00:00:45,690 --> 00:00:46,770 It's a bit more complex 17 00:00:46,770 --> 00:00:47,603 and for that reason 18 00:00:47,603 --> 00:00:51,870 we are not going to talk about Btrfs in this video. 19 00:00:51,870 --> 00:00:53,695 If you want to create a file system 20 00:00:53,695 --> 00:00:56,520 mkfs is the main utility 21 00:00:56,520 --> 00:00:58,470 and mkfs is followed by a dot 22 00:00:58,470 --> 00:01:00,960 and the name of the file system that you want to create, 23 00:01:00,960 --> 00:01:02,706 like mkfs dot xfs 24 00:01:02,706 --> 00:01:04,980 or mkfs dot ext4 25 00:01:04,980 --> 00:01:07,713 These are Linux native file systems. 26 00:01:08,970 --> 00:01:11,880 There are also windows compatible file systems 27 00:01:11,880 --> 00:01:14,475 like vfat and NTFS-NG. 28 00:01:14,475 --> 00:01:17,610 They provide support for windows, 29 00:01:17,610 --> 00:01:18,443 but in general 30 00:01:18,443 --> 00:01:22,050 there is no need to use file systems like vfat or NTFS 31 00:01:22,050 --> 00:01:24,483 unless for formatting USB thumb drives. 32 00:01:26,160 --> 00:01:29,250 You will however see vfat in one location. 33 00:01:29,250 --> 00:01:31,080 And that is as a boot partition. 34 00:01:31,080 --> 00:01:32,640 And that's because if your system 35 00:01:32,640 --> 00:01:35,130 is using UEFI for booting, 36 00:01:35,130 --> 00:01:37,230 then you need a partition, 37 00:01:37,230 --> 00:01:39,570 that is formatted as vfat 38 00:01:39,570 --> 00:01:42,060 because vfat is the only file system 39 00:01:42,060 --> 00:01:44,370 that is readable and writeable from Linux, 40 00:01:44,370 --> 00:01:46,440 windows, and MacOS as well. 41 00:01:46,440 --> 00:01:47,730 This vfat partition 42 00:01:47,730 --> 00:01:49,980 contains some essential information 43 00:01:49,980 --> 00:01:50,813 that is required 44 00:01:50,813 --> 00:01:53,190 to boot your system successfully. 45 00:01:53,190 --> 00:01:56,100 Well that's not something we are going to do in this class. 46 00:01:56,100 --> 00:01:57,720 You should just remember 47 00:01:57,720 --> 00:01:59,730 that vfat and NTFS-NG 48 00:01:59,730 --> 00:02:02,130 are not really required 49 00:02:02,130 --> 00:02:03,897 to access windows, 50 00:02:03,897 --> 00:02:05,790 unless you are using 51 00:02:05,790 --> 00:02:08,670 WSL where the windows partition 52 00:02:08,670 --> 00:02:10,740 is mounted in the Linux file system. 53 00:02:10,740 --> 00:02:12,270 That's a different story, 54 00:02:12,270 --> 00:02:15,226 but on real Linux distributions 55 00:02:15,226 --> 00:02:18,450 vfat and NTFS-NG are rarely found. 56 00:02:18,450 --> 00:02:20,673 Let me show you how to create a file system. 57 00:02:23,490 --> 00:02:25,380 So I'm going to create a file system 58 00:02:25,380 --> 00:02:27,900 on the partitions that we created before 59 00:02:27,900 --> 00:02:29,388 and I'm using a 60 00:02:29,388 --> 00:02:30,460 sudo mkfs.ext4 61 00:02:31,751 --> 00:02:34,233 on /dev/sd, 62 00:02:35,280 --> 00:02:36,450 sdb1 63 00:02:36,450 --> 00:02:37,380 And that is all, 64 00:02:37,380 --> 00:02:39,540 that's creating the file system 65 00:02:39,540 --> 00:02:40,800 so that wasn't too hard. 66 00:02:40,800 --> 00:02:43,980 And if you sudo mkfs.xfs 67 00:02:43,980 --> 00:02:46,830 on dev/sdc1 68 00:02:46,830 --> 00:02:49,410 we can create an XFS file system. 69 00:02:49,410 --> 00:02:50,520 You can see that both 70 00:02:50,520 --> 00:02:51,450 of these utilities 71 00:02:51,450 --> 00:02:54,330 are providing some information about what they have done, 72 00:02:54,330 --> 00:02:55,410 but at this point 73 00:02:55,410 --> 00:02:57,870 the file system has been created. 74 00:02:57,870 --> 00:03:01,350 In the next video we will explore mount 75 00:03:01,350 --> 00:03:04,113 and I will tell you how to activate the file system.