Getting Familiar with the Operating System
The operating system is a software that manages everything that goes on in the computer. It reads, writes, and deletes files from the hard drive. The OS handles how the process starts, how they interact with each other, and how they finish. It manages how memory gets allocated different processes, how network packets are sent and received, and how each programming can access the different hardware components.
There are two main parts in the operating system:
The kernel and The user space.
The kernel is the main part of the Operating System. It will talk directly to the hardware and manages the systems resources. As users, we can’t interact with the kernel directly. Instead of that, we interact with the other part of the operating system called the user space. The User space is everything outside of the kernel. These are some things that we can interact with directly, like the system programs and user interface. So when we are refering to operating system, we’re referring to both the kernel and the user space. The operating system does a lot of things. In some cases though, our scripts may interact with the kernel of the operating system to get extra information or to ask it to perform certain operations.
There’s a lot of different operating systems out there. The major operating systems which are being used in the IT today are Windows, Mac OS, and Linux. The Windows operating system is developed by Microsoft, and is widely used in the business and consumer space. Most PC’s come with Windows OS as their default operating system. Mac OS is developed by Apple and it is mainly used in the consumer space.
Linux is an open source operating system. Open source software is free to share, modify, and distribute. Linux is used heavily in business infrastructure. Most servers in the world today are running Linux.
Linux itself is the name of the kernel originally developed by Linus Torvalds. Because of the evolution of the rest of the operating system, we usually use Linux to refer to both the kernel and the whole operating system. Today, Linux has grown into a huge community effort with the developers all over the world. As Linux is an open source, a lot of different organizations package their own versions of it, unlike Windows or Mac OS which are developed by their respective companies. We refer to these different flavors of Linux as distributions.
Some common Linux distributions are; Ubuntu, Debian, and Red Hat. Chrome OS, you may know that it’s another operating system based on a Linux kernel. Chrome OS is considered an OS in its own right. Lastly, the Android operating system which is used a lot on smartphones also runs a Linux kernel. You may have also heard of Unix. Unix is an operating system developed in the 70’s by Bell Labs. After its release, the OS went through a bunch of different versions with different companies releasing variants of it. The fundamental idea of how Linux works today is based on the Unix principles. A lot of the tools that we now use to interact with the operating system are open source versions of originally developed for Unix. This is why these tools are usually referred to as Unix. Even though the Operating System we are using is called Linux. So, Linus which created Linux is based on Unix.
The Mac OS kernel and some of its user spaces are also based on a kernel and User space tools from the Unix family known as BSD. Although the graphical interface is extremely different between the two operating systems, the command line is actually quite similar.
Python is a cross-platform language. We can use it on Windows, Mac OS, Linux, and even lesser known Unix variants like FreeBSD. It’s even available on mobile phones. Since python is a cross-platform, we can use the same Python code to get to our goal on any operating system, whether the goal is opening files, processing text, or managing running processes.