Книга: Linux Command Line: An Admin Beginners Guide
Назад: CHAPTER ONE: INTRODUCTION
Дальше: What is the Linux Shell?
CHAPTER TWO: Linux Overview
What is Linux?
Linux is an operating system or OS. An operating system is defined by Wikipedia ( ) as follows:
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Think of the operating system as a body with the Linux kernel as the brain. The brain uses arms, legs, fingers, toes, etc (computer hardware) when needed. The brain plans out when to take lunch and other activities (software resources) during the day. Think of software resources as actions such as waking up, brushing teeth, and going to work. The brain also provides common functions needed for living such as breathing, heartbeat, decision making, etc. The Linux kernel needs to perform these common services such as incrementing the internal clock, etc.
The computer hardware can be thought of as the mouse and keyboard and video display. The operating system manages the input from the keyboard and mouse and displays the output on the screen. A software resource such as Word or the app running on a Kindle just sends what it wants to display to the operating system. The OS manages the hardware that changes the pixels to make the picture on the display. The OS also gives each running program a piece of time to run otherwise only 1 program could run at a time. Can you imagine only being able to check the internet, then shutting Firefox down so that you could check email, then closing that to open the calendar app?
Why Use Linux?
You may have noticed the popularity of the Linux Operating System (or Linux OS) in webserver work and other backend computer functions. It has a reputation for being dependable and having long up-time which means it doesn't crash often or require frequent reboots. A typical website may be running on a Linux Operating System that has continued to run uninterrupted for months or years without a restart.
Linux is one of the most secure, robust, and user-friendly free open-source operating systems available. The Linux OS can easily compete with Microsoft's Windows and Apple's iOS in terms of features, which is truly impressive for free software maintained by a population of volunteers.
Linux is open-source and there are several versions that are completely free. What is open-source? Open-source means that anyone can download and look at the computer code that runs Linux and build it to generate their own version of Linux. Because Linux is open-source, there is an entire ecosystem of volunteers that are constantly fixing and adding features to Linux.
There are paid versions of the Linux OS that offer technical support for a fee. Many corporations use these companies to keep their servers running smoothly and to also keep their systems secure.
The Linux operating system also has applications for home use. However, one disadvantage Linux has compared to Windows and Apple OS is the lack of infrastructure. Popular tools such as Word, Excel, and Powerpoint are not supported on Linux although there are good alternatives such as LibreOffice or Google Docs. Although it cannot run all the apps and programs that iOS and Windows can, depending on what you want to do, a Linux operating system may still fit your needs. Chromebooks, for example, run on a Linux kernel.
A Linux system is great for learning computer programming because many programming tools are already installed or are very easy to install. Also, many people prefer Linux when building computers because they can view and modify its source code to suit their needs.
It's also one of the smallest and most portable operating systems available. It's the operating system of choice for Raspberry Pi, an inexpensive mini computer that you can hold in the palm of your hand, and is also the system of choice for serious programmers, backend developers, and security-conscious end users.
How Linux Started
As mentioned earlier, Linux is open-source software modeled after the AT&T proprietary software UNIX, which stands for Uniplex Information and Computing Service. Linux, although it shares many features with UNIX, does not contain any of the UNIX source code. It was created from scratch to be compatible with UNIX, so people who were used to UNIX could more easily transition to Linux.
The creation of Linux as we know it today is credited to a developer named Linus Torvalds , who created the Linux kernel from scratch, then made it completely free and open-source, even citing in the licensing agreement that it was not to be sold. Later, Linux was relicensed under the GNU GPL license, enabling it to be sold under certain conditions. The first version of Linux available to home users came out in 1992.
Linux developers focused on keeping Linux "free" and open-source rather than allowing it to be changed and claimed by corporations like Microsoft. This resulted in Linux taking some interesting turns in its evolution. Rather than adding various apps and accessories for home users, Linux evolved to be a more streamlined and clean-running operating system, embraced by professionals and programmers, especially for use in servers and backend development.
Linux is licensed under a GPL version 2.0 license. Referred to as "copyleft ," this software can be used, modified, and distributed freely, under the condition that any derivative works produced from it are also released as open source.
What is Open Source Software?
Open-source software is software that allows you to see the source code. This allows users to potentially read and create similar programs, as well as build add-ons for existing programs. A common misconception is that all open source software is free for all uses; this is not necessarily true.
All open-source software is not necessarily completely free software, in that it costs no money, as some open-source software is only free for home and personal use. Open-source software is also sometimes sold at distributors, though it does not necessarily give you the right to modify or re-distribute the software. Other open-source software is free to download, but it charges a contract fee for licensing.
All open-source software is free, however, in that it is intended to help further people's understanding and enthusiasm for programming. Being able to view the code and not allowing certain Linux code to become proprietary trade secrets has helped Linux develop a robust community of enthusiastic developers and users.
Linux software, in comparison to most other open-source software, is free in both its open-source characteristics and the lack of financial cost to the end-user. It can also be modified in any way the end user wishes. This kind of software is called Free Open Source Software or FOSS . The status of FOSS does not necessarily apply to all open-source software. Keep in mind that some parts of the Linux software are not FOSS.
Is Open Source Software Safe?
Someone familiar with Windows might think that with free software the fact that anyone can create, edit, and update is fairly risky.  However, Linux edits go through an extensive review process before being accepted and therefore Linux is one of the most secure systems available, perhaps even more secure than the popular, security-based Apple OS. Part of this is due to the Linux operating system, which functions a lot like the Apple OS, only allowing certain approved programs to be downloaded and only giving downloaded programs limited permission to interact with the rest of the system.
Linux also has a relatively small user base compared to the other operating systems and isn't usually a target due to the extra work it would take to hack into it. In fact, it's one of the systems security-conscious individuals such as IT professionals usually choose to have on their computers.
Being open-source has been useful for security because many developers are constantly examining the code for vulnerabilities and quickly fixing them.
In contrast, closed-source kernels, such as Windows and Apple, rely only upon the expertise of the developers working for Microsoft or Apple. Patches for bugs are released occasionally. Other times, minor bugs in software and even significant security concerns are overlooked until there are serious customer complaints. This is one of the downsides to having to depend on a handful of programmers to maintain a closed-source product. 
With Linux and a little bit of training, you can spot bugs and weaknesses in programs, then report or even attempt to fix them yourself. Windows and Apple simply do not grant the end-user that level of control. Since a lot of the people who keep Linux running may be security-conscious individuals who depend on Linux to keep their company machines in working order, security concerns may often take top priority.
The Linux Community
Dedicated volunteers put in hours of their time creating and helping service new programs that are comparable and even compatible with software written for commercial operating systems or hardware. This is a huge undertaking and unlike commercial developers like those who work for Microsoft, Google, or Apple, the people responsible for new Linux programs are just as likely to be hobbyists who program computers on the side or do something unrelated to computer programming as skilled programming professionals. 
It's important to keep these things in mind if you are working with a Linux system. Rather than a product mass-produced by the commercial industry, certain distributions of the Linux operating system are comparable to a carefully crafted homemade product. It may take some tinkering to get them to work the way you want and you could choose a version by mistake that isn't made to do what you want it to do.
Which Distribution Do I Need?
Just like other products, commercial and otherwise, distributions of Linux, called distros , range in quality. The slightly older distros of Linux tend to be more reliable and have more support than the newer, "bleeding edge" versions of Linux.  It's easier for new OS developers to build off of existing Linux kernels than it is for them to create a brand new operating system from scratch. As a result, most Linux operating systems are fairly similar to one another, and a lot of existing Linux software can be run on "new" versions of Linux.
Although there are several versions of Linux available, they just tend to be different versions or "flavors" of a few main versions of Linux. This list includes Debian, Fedora, and Ubuntu.
What to Look for in a Distro
When choosing a Linux distro, you might want to consider your own needs, including how comfortable you are with the command line, what purpose you need the distro for--do you need it for headless IoT or are you trying to set up a home server or desktop? The answers to these questions may greatly influence which distro is right for you; Linux distros are not necessarily one-size-fits-all.
What Do You Need Linux For?
Home Use
For home use or programming practice, it is probably best to use Ubuntu. It's fairly stable and comes with a lot of features out-of-the-box, including a fully functional desktop environment and package manager that makes it behave similarly to an Apple OS or Chromebook. Because of its familiarity, it might be less intimidating than some of the other versions of Linux available.
It is also a widely used version of Linux with lots of community support. Community support is important if you run into problems because a problem in Ubuntu has probably been answered.
The downsides of almost any version of Linux for home use is that not all of it will function like an Apple or Windows machine. Although Linux is more popular than Windows or iOS for server applications, it hasn't taken off in the consumer market. As a result, most software companies haven't created Linux versions of their products.
Photoshop, for example, does not have a Linux version. However, there are free open-source alternatives such as GIMP for Linux. Plus, Linux has a surprising number of programs that are made specifically for the Linux OS. Unless you need something specific like Microsoft Office, you may be able to find a decent work-around or alternative software. 
Server or IoT
Some people are more concerned about programmability and stability than ready-installed or ready-to-install packages. In this case, a "headless" version of Linux, streamlined and without all of the "bells and whistles" such as a desktop environment to get in the way, might be more appropriate.
In this case, consider the Fedora server version for security, stability, and support. If you run more than just a home server or your business or product relies on Linux to always function properly, you may want to opt for a product backed by Red Hat.
Project Learning
Debian might be a good idea if you are trying to learn robotics or remote programming. If you are experimenting with a Raspberry Pi, the Raspbian operating system built especially for Raspberry Pi, might not be a bad distro to try either.
If you are a more advanced tinkerer, you may want to look at a basic flavor of Arch Linux or a similar distribution that is lightweight and flexible while still being relatively well-supported. It all depends on the project.
You should choose and take advantage of a distro with an active and robust community of hobbyists and enthusiasts for any projects you are trying to do. Internet research, Youtube videos, and community forums may also help you decide which distro is right for you and your project.
Chapter Summary
Назад: CHAPTER ONE: INTRODUCTION
Дальше: What is the Linux Shell?