What is Linux?
Linux is the best-known and most-used open source operating system. As an operating system, Linux is software that sits underneath all of the other software on a computer, receiving requests from those programs and relaying these requests to the computer’s hardware.
This open source cooperation among companies and developers has led to making Linux one of the best ecosystems for use from small digital wristwatches to servers and supercomputers. Based on statistics, there are at least 100 companies and more than 1000 developers who work together for every kernel release. Linux is composed of a kernel, the core control software, plus plenty of libraries and utilities that provide different features. Linux is available through many distributions. These are what we can call Linux flavours. Distributions are groups of specific kernels and programs. The most popular ones include LinuxMint, CentOS, Fedora, Arch, SUSE, Ubuntu, and Red Hat.
Why Linux is better than other operating systems.
Supports clustering — Multiple Linux systems can be configured to appear as one system from the outside. Service can be configured among clusters and still offer a seamless user experience.
Runs virtualization — Virtualization allows one computer to appear as several computers to users. Linux can be configured as a virtualization host. where you could run other OS such as Windows, Mac OS, or other Linux systems. All the virtualized systems appear as separate systems to the outside world.
Cloud Computing — Linux can handle complex, large-scale virtualization needs — including virtual networks, networked storage, and virtual guests.
Options for Storage — Data need not always be stored in your computer’s hard disk. Linux offers different local and networked storage options such as Fiber Channel and iSCSI.
The benefits of using Linux
- Being open-source, anyone with programming knowledge can modify it.
- It is easy to learn Linux for beginners
- The Linux operating systems now offer millions of programs/applications and Linux softwares to choose from, most of them are free!
- Once you have Linux installed you no longer need an antivirus! Linux is a highly secure system. More so, there is a global development community constantly looking at ways to enhance its security. With each upgrade, the OS becomes more secure and robust
- Linux freeware is the OS of choice for Server environments due to its stability and reliability (Mega-companies like Amazon, Facebook, and Google use Linux for their Servers). A Linux based server could run non-stop without a reboot for years on end.
- Linux has a large community online where new users can get information, read FAQs, and ask questions if there are programs or features that you think are not working right. The great thing about open-source is that with plenty of people involved in the OS, there are an unlimited number of resources that you can use and learn from.
Understanding Linux Architecture
Linux architecture can be divided into two spaces. The User Space and the Kernel Space.
User Space — This is where the applications are used. The GNU C library, in the User space, is the interface that connects to the kernel and transitions between User and Kernel space. This uses all the available memory.
Kernel Space — All Kernel services are processed here. The Kernel
space is further divided into three.
- System Call Interface — A User process can access Kernel space
through a System Call. When a System Call is performed, arguments
are passed from User to Kernel space. This is the layer that
implements basic functions.
- Kernel Code — This is the architecture-independent code, and can be
seen in all architectures that Linux supports.
- Architecture-Dependent Kernel Code — This is the layer for
If we work as developers, we’ve to work with the Linux command line eventually. We’ll look at some basic Linux commands we should know to work with the Linux command line.
Why should one learn the Linux command line?
- You get to know much more about your operating system.
The shell exposes you to the filesystem more directly than the graphical file browser, it makes you understand the hierarchy and structure of the OS. You also get to play with the configuration files directly and this gives you the power to control your operating system more efficiently.
- You can control computers and servers remotely.
Network protocols like SSH and Telnet allow you to remotely connect to computers on a network, but they only provide you with the shell and not the graphical interface. Therefore you can use these protocols only if you are familiar with the shell.
- You can install Ubuntu Linux without anyone’s help
Ubuntu Linux is a Linux distribution which scares many beginners because of its installation method. To install Ubuntu Linux you need to do all the steps manually from disk partitioning to user creation, using the shell. You need to be very good at the Linux shell to install Ubuntu Linux.
- You can get paid to configure and administer Linux Servers.
Most companies have a job posting titled, “Linux System Administrator”. The role of the person at this position is to maintain the Linux computers and make changes and configurations to them as per the requirements. The person at this role has to be very good at the Linux Shell and should know all the commands required to configure a Linux system.
The most useful basic commands
These commands will enable you to experience the shell in a way where you will be able to perform all the tasks that you have been doing in the Graphical User Interface environment, like creating and deleting directories, writing, editing and deleting files etc., in the shell without facing any problems.
pwd stands for Print Working Directory. It shows the directory that we’re in now.it prints the complete path to the directory that you are working in.
mkdir lets us make a new directory in the current working directory by typing in the directory name after mkdir.
cd stands for change directory. It lets us change directory to a different directory by typing in the directory name we want to switch to after cd.
touch lets us create a new text file by typing in a file name after it.
Nano is a terminal based text editor, which can be used to create and edit text files and also edit configuration files. It is similar to any other text editor like notepad
Cat command is used to print the contents of a file on the shell console, it is mostly used when you want to see what is present inside a file.
Remove(rm) command deletes files instead of directories.
cp lets us copy files from one place or another and if it’s the same directory, it’ll rename the file
mv is short for a move. It lets us move files around our system. We can use the -f switch to force the operating system to move big files.
This is a small calendar program that we can run to get some information about today’s date and other things.
List (ls) command prints the contents of the current working directory, it prints the names of all the files and directories present in the current directory.
rmdir is used to remove the directory with the given name.
create file recursively
create file more than one as per given name with extensions
create folder recursively
create folder more than one as per given name with extensions
remove folder recursively
remove folder more than one as per given name with extensions
The alias command lets us replace a word by another string. This helps us replace long commands with shorter ones.
a cow asks you if you have mooed today
change images in the terminal using the convert command. You can very simply use it to change the file type.
You can use it scale, rotate and do more to an image more easily than with some of the convert commands. To resize you can use something like
Show’s the current date, timings and timezone as well.
for access the root path
change your current path to root path
Display results of finding expressions in a file
Shows online information about a command
man(manual) command will open the manual page for the command given after man. Manual pages contain documentation about all commands available in Linux, they provide information about the correct use of the command and different options available for the command. To exit from man page press ‘q’.
create file to write a text on terminal
helps to create a new file using echo a file via terminal interface
Shows a short description of a specific keyword
Search for executable files
wget lets us download files from the Internet right from the terminal. It works with HTTP, HTTPS, and FTP servers.
a package manager is that before upgrading or installing software, it does not check to see if there’s a newer version in the repositories. Before doing any installation.
You can upgrade the softwares from the terminal
Unlike a graphical package manager or software centre, you can’t quite search for the kind of packages you want to install, so you need to know the package name before installing. Once you do though
apt-get remove — purge
apt-get remove enables you to uninstall software as well. This is simply done by replacing install with remove in the same command that you would use to install. You can also use purge instead of remove if you want to delete any
confi g fi les along with it.
Side notes and points to be remembered:
- Linux shell is case-sensitive, therefore ‘desktop’ and ‘Desktop’ don’t imply the same meaning.
- Care should be taken while writing paths in Linux because ‘boot’ and ‘/boot’ are two different folders.
- The only way to master the Linux shell is by spending time in it and using it every day. It is an added advantage if your main OS is Linux.
- Anything that you do in the Linux OS, try to find a way to do the same thing but from within the shell. Stack Overflow is a great place to get your Linux questions answered.
My first encounter with the Linux terminal was 2 years ago and I too was very intimidated by it. For these two years, I have been learning something new about Linux every day. The energy and time that you spend while learning Linux is completely worth it and will never go in vain. Linux is the biggest and the oldest Open-Source project and learning it is the first step in the process of contributing to it.
Linux has lots of commands that we should know about. We should know how to traverse directories, list files, and copy/moves files. Also, knowing how to download files is also handy.
Feel free to point out any mistakes you find, constructive criticism does no harm.