The Heart of Your Computer

From Wikiversity
Jump to navigation Jump to search

This is a lesson in the course How to Use Your Computer, which is a part of The School of Computer Sciences

What Is the Kernel?[edit | edit source]

The most important piece of software in a computer is the kernel. The kernel is the part of the operating system that handles connecting your applications to your CPU, RAM, and other components. To understand how to use your computer, you should first know how to use your kernel. In this lesson, we're going to touch some core concepts needed to understand how to use it and some ideas about the kernel itself.

File Systems[edit | edit source]

A file system is a tool used by humans to make the huge number of files contained on a hard disk more manageable. It's a system of folders and files that are organized hierarchically.

A file system GUI


The shape or structure of the file system is stored on the disk, along with the files it organises. It is important to note that the files on a hard disk are not organised the same way they are seen in a file system, though for most cases, the file system will suffice when we want to refer to a file. There are a couple of noteworthy types of folders and files in a directory structure, and there are several formats for the way the files are organised within the structure.

Root Directory[edit | edit source]

The root directory or root folder is the one folder in which all other folders in a file system reside. Your root folder doesn't exist inside of anything else. Here are some ways you could symbolise a root directory; some of them may be familiar:

/
C:\

Hard Links[edit | edit source]

A hard link is something that gives a file its name. When a file gets saved on a hard drive, it's there, but it doesn't exist in the file system yet. When a hard link is created to the file somewhere in the file system, the file gets a home in the file system. Every file you see on your computer is in fact a hard link, representing a file. Your computer usually takes care of this automatically for you.

Symbolic Links[edit | edit source]

Symbolic links are a neat kind of file that make a reference to another file or folder, They are similar to a hard link, but instead of referencing a file on a disk, the way a hard link does, a symbolic link represents a file by representing a hard link. Lets say that

/imASymbolicLink

is a symbolic link to

/folderA/folderB/thisFile

Whenever we navigate to the path

/imASymbolicLink

the computer automatically takes us to

/folderA/folderB/thisFile

This is handy for moving around complicated file systems efficiently.

File System Formats[edit | edit source]

  • HFS
  • NTFS
  • FAT16
  • FAT32



Users & Permissions[edit | edit source]

Users were created because more than one person may use a single computer. Having multiple user accounts allows different people to use a computer. Through the magic of networking, some computer kernels allow multiple users to use a single computer at the same time. Permissions were created to help ensure privacy and security for the users of a computer. A file or folder can have three types of permissions placed on it, which can vary based on the relationship a user has with a file or folder.

The three types of permissions a user can have are the ability to read a file, the ability to write a file, and the ability to execute a file. Reading a file simply entails being able to see a file's contents. Right now, you have permission to read this Wikiversity resource. You also have the ability to write to it, by editing it. the last permission, executable, refers to applications. If you have a copy of a calculator program and you changed its executable permission, you would no longer be able to run the program.

These permissions can change based on whether or not you were the person that created the file, or if you are someone else. If you created the file, you are considered the owner of it. Everyone else is considered everyone; you can change the permissions that the public has to the files. There is a third category that a user can fit into, which is group.

Users can belong to groups. At a school, there might be teachers and students. The teachers don't want the students to see their testing materials, so they set the permissions for everyone on their testing materials to have no permissions at all. The teachers might want to be able to collaborate on their material, so they can set their group, teachers, to be able to read and write. The students, when they're given a test, don't want their classmates cheating off them, so they might set only their owner permissions for the test, and disable reading and writing for everyone.

Root User[edit | edit source]

A special type of user is the root user. It's a different concept from the root directory, but it does have something in common. A root user has the ability to use and access all of the files on a computer, no matter who they belong to. Root access exists so we never get locked out of things. Theres not too many cases we need to use it, but sometimes we do, like if the police found out a student was cheating, they might need the ability to check the students computer for the illicit material (a stretch, but the point is made).

Communicating with the Kernel[edit | edit source]

A shell is a program that lets a user communicate with a kernel, therefore allowing communication with the computer's hardware. These are most common different types of kernels that you'll typically encounter.

  • On Linux, The kernel is Linux
  • On Mac OS, the kernel is UNIX
  • On modern versions of Windows, the kernel is Windows NT

While it's possible to complete most tasks on a computer without a shell, it's often faster to perform them in a shell. The rest of this course will cover the basics of using a shell. Back to the course page.