CHAPTER 14 Understanding Linux Files (Web host 4 life)

CHAPTER 14 Understanding Linux Files and Users Most of us are used to dealing with files the things that live on our hard disks, floppies, and CD-ROMs, and contain data and program code. It should come as no surprise that Linux has its own file structure, which is different from Windows, in terms of where data is stored and also the underlying technology. Taking a page from Unix, Ubuntu takes the concept of the file system to an extreme. To Ubuntu, almost everything is treated as a file: your PC s hardware, network computers connected to your PC, information about the current state of your computer . . . almost everything finds a home within the Linux file system. Linux places an equal emphasis on the users of the system. They own the various files and can decide who can and cannot access various files they create. In this chapter, we ll delve into users, files, and permissions. You ll be introduced to how Ubuntu handles files and how files are tied into the system of user accounts. Real Files and Virtual Files Linux sees virtually everything as a series of files. This might sound absurd and certainly requires further explanation. Let s start with the example of plugging in a piece of hardware. Whenever you attach something to a USB socket, the Linux kernel finds it, sees if it can make the hardware work, and, if everything checks out okay, it will usually make the hardware available as a file under the /dev directory on your hard disk (dev is short for devices). Figure 14-1 shows an example of a /dev directory. The file created in the /dev directory is not a real file, of course. It s a file system shortcut plumbed through to the input and output components of the hardware you ve just attached. Note As a user, you re not expected to delve into the /dev directory and deal with this hardware directly. Most of the time, you ll use various software packages that will access the hardware for you, or use special BASH commands or GUI programs to make the hardware available in a more accessible way for day-to-day use.

Leave a Reply