|
![]()
The Linux FilesystemWell, now you have your brand spanking new linux system installed, and you are probably wondering, just how to I move around in the filesystem, what is a filesystem, and how do I edit files? We hope that this section will make you more at home when dealing with linux from the command line. The first thing you will want to know is that unlike other operating systems, there are no "drives" exactly. Instead everything is a "file" or "directory". For instance, you noticed in the installation that it asked you where you wanted your root filesystem and where you wanted to mount it. Of course, you must have a "root" partition that is mounted on / So what does this mean exactly? Well, you now have a "drive" that is mounted on your system as the root of your filesystem. So unlike Windows, if you want to get to the first partition on your first hard disk, instead of typing C: <ENTER> your would type cd / <ENTER> and that would put you in the same place physically on your hard disk. Let's take a look at the common structure of a linux "C: Drive" shall we? If we issue the command cd /and then we issue the command ls -althis is what it should look like (or close anyway) [[email protected] /]$ ls -al total 50 drwxr-xr-x 16 root root 1024 Jun 6 22:18 . drwxr-xr-x 16 root root 1024 Jun 6 22:18 .. drwxr-xr-x 2 root root 2048 Aug 1 02:20 bin drwxr-xr-x 2 root root 1024 Jun 21 13:05 boot drwxr-xr-x 3 root root 20480 Oct 16 17:14 dev drwxr-xr-x 20 root root 2048 Nov 11 01:08 etc drwxr-xr-x 21 root root 1024 Aug 21 17:41 home drwxr-xr-x 4 root root 2048 Jun 16 08:55 lib drwxr-xr-x 2 root root 12288 Jun 5 12:58 lost+found drwxr-xr-x 4 root root 1024 Jun 5 13:17 mnt dr-xr-xr-x 5 root root 0 Oct 16 13:14 proc drwx------ 12 root root 1024 Nov 8 02:03 root drwxr-xr-x 3 root root 2048 Jun 21 12:57 sbin drwxrwxrwt 2 root root 1024 Nov 11 21:01 tmp drwxr-xr-x 20 root root 1024 Aug 15 19:01 usr drwxr-xr-x 13 root root 1024 Aug 15 19:04 var [[email protected] /]$So just what is all this stuff? It is your newly installed linux filesystem. Let's break each directory down and see just what is contained in each one.
Ok, so what do I mean by everything is a file or directory? Well..literally, everything is a file. Even the devices in your computer are recognized as files in a linux system. So what am I gettin at? Well, you should probably learn what files are associated with the hardware you might have in your machine. And here is a handy table of the most common pieces of hardware in your system.
|
|