كتاب تعلم لينكس للمبتدئين PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 96

Linux for Beginners

The Complete Tutorial Guide for Beginners and Pro to Master the Linux
Operating System and Command Line Basics

Curtis
Campbell
Copyright © 2021 Curtis Campbell

All rights reserved.

It is not legal to reproduce, duplicate, or transmit any part of this document by either electronic means
or in printed format. Recording of this publication is strictly prohibited

Disclaimer

The information in this book is based on personal experience and anecdotal evidence. Although the
author has made every attempt to achieve an accuracy of the information gathered in this book, they
make no representation or warranties concerning the accuracy or completeness of the contents of this
book. Your circumstances may not be suited to some illustrations in this book.

The author disclaims any liability arising directly or indirectly from the use of this book. Readers are
encouraged to seek Medical. Accounting, legal, or professional help when required.

This guide is for informational purposes only, and the author does not accept any responsibilities for
any liabilities resulting from the use of this information. While every attempt has been made to verify
the information provided here, the author cannot assume any responsibility for errors, inaccuracies or
omission.
Contents
INTRODUCTION
CHAPTER ONE
Meaning of Linux
How is Linux working OS utilized?
What is an Operating system?
Definition of UNIX
Difference between Linux and UNIX
CHAPTER TWO
Benefits of Linux
How to Choose Linux Distribution
Ubuntu and Linux Mint
SuSE Linux
Red Hat/CentOS/Fedora
Debian
Slackware and Arch Linux
CHAPTER THREE
Basic Linux Commands
CHAPTER THREE
Installing Linux
What type of PC is needed?
CPU
RAM
Video Card
How to Install a Linux Distribution
Steps to take to install Linux with USB Stick or CD-ROM
Installing Linux using Virtual Box VMWARE
CHAPTER FOUR
How to copy an ISO file to CD or DVD
About Sort Command
CHAPTER FIVE
How to sort files
Open and Edit Files
CHAPTER SIX
How to Create a Collection of Files
How to Create a File Using the Touch Command
How to Create A File Using The Redirection Operator
How to Create a File Using the Cat Command
How to Create a File Using the Echo Command
How to Create a File Using Heredoc
How to Create a Large File
Creating a large file with the dd command
How to use the fallocate command
How to Compress Files to Save Space
CHAPTER SEVEN
Alternatives to Microsoft Office
Alternatives to Internet Explorer
Alternatives to Photoshop
CHAPTER EIGHT
Alternatives to Adobe Acrobat Reader
What is Shell Scripting?
Types/Kinds of Shell
How to Write a Shell Script
Shell Variables
CHAPTER NINE
Why you should use Linux
How to Partition disk
Features of Ubuntu 20.04 LTS
CHAPTER TEN
Linux security Tips
Linux Network Administration
How to know a file’s type
CHAPTER ELEVEN
How to know the file type of several files
How to view the mine file type
How to delete, copy, move, and rename files
How to use the Linux copy command to copy files
Moving and Renaming Files in Linux
Deleting files in Linux
CHAPTER TWELVE
Environmental variables
Shell Variables and Environment Variables
List of commands and set environment variables in Linux
Common Environment Variables
Files and Directory Permissions
CHAPTER THIRTEEN
Adding a User Group
What does User Group in Linux mean?
Adding User to Group
Adding a User to Several Groups Simultaneously
Adding a User and Add to Group
CHAPTER FOURTEEN
How to Delete a Created Group
Listing Groups in Linux
Archives and Compressed File Commands
Archiving files on Linux using tar
Extracting files using tar on Linux
How to Compress Files Using gzip on Linux
CONCLUSION
INTRODUCTION
Linux is an open-source and free Operating System that depends on the
UNIX programming language. The beauty of the Linux system it is free and
easy to use. Furthermore, in comparison with other Operating Systems, Linux
has a very large user base.
The OS was built on the Intel x86 model and it allows users to customize it to
any form, based on what they like. Additionally, the Linux-based system is
capable of supporting multiple directories and libraries.
Before using the Linux Operating System, you need to have basic knowledge
about reading, writing, and editing shell script. In recent times, the Linux OS
was not known by an average PC user, but it has grown massively to be used
in Android, smart watches, video games, washing machines, and so much
more technologies.
For the records, Linux users have grown since March 14, 194, when its first
version (Linux Kernel 1.0) was established. A large number of Linux
distributions allow users to easily operate the Operating System without
stress. While a few Linux distributions are sold to the public, others can be
obtained for free.
As a newbie in the world of Linux, you are urged to continue reading to learn
more about the OS and possibly integrate it into your PC.
CHAPTER ONE
Meaning of Linux

LINUX is a kernel or an operating system dispersed under an open-source


permit. Its usefulness list is very similar to UNIX. The piece is a program at
the core of the Linux operating system that deals with basic stuff, such as
allowing hardware to speak with programming.
Linux is upheld on pretty much every significant computer platform
including X86, ARM, and SPARC, making it quite possibly the most broadly
upheld Operating Systems. Although it started out as a PC operating system,
but it has broadened its horizon to include supercomputers, data centers,
servers, and so much more devices.
In fact, Linux is operated in integrated devices like security controls, routers,
game consoles, smartwatches, digital cameras, Androids, TV and so much
more. Additionally, Linux has the largest user base when any operating
system is brought to the table due to the addition of Android.
Linux also has its distribution, and it is usually called a set of Linux
packages. Furthermore, Linux distribution is also seen as an operating system
that includes a range of algorithms focused on the Linux kernel, which also
includes the Linux supporting software and modules.
Users can derive or obtain a Linux-based Operating System by simply
installing one of the Linux distributions, which can be gotten on several
devices like computers, and embedded systems.

How is Linux working OS utilized?


Each model of the Linux operating system oversees hardware assets,
dispatches and handles applications, and gives some type of UI. The massive
advancement local area and wide scope of conveyances imply that a Linux
version is accessible for practically any assignment, and it has entered
numerous spaces of computing.
For instance, Linux has arisen as a famous OS for web workers like Apache,
just as for network activities, logical processing undertakings that require
high figure groups, running data sets, and running cell phones with OS
versions like Android.

What is an Operating system?


The Operating System on your PC is in control of the computer’s software
and hardware. Various computer apps are majorly run at the same time, and
they require access to your PC’s CPU, memory, and storage. Usually, this
operation is controlled and run by the Operating System to make sure that all
the software gets the resources it needs.
System development and Computer software gain majorly from an Operating
System and without having an Operating System, each app will have to add
its user interface and the extensive code needed to control the PC’s low-level
functions like network connectivity, disc storage, and others.
Due to the numerous available hardware resources, it is likely to increase any
app size and make software development meaningless. A lot of fundamental
and important tasks, like presenting text on a major output screen, and
sending data packets may be passed on to system software.
Going further, system software permits applications to interact with the
devices at all times without the applications being aware of important
information as concern the hardware. The Operating System can work on
nearly any range of apps if they gain access to similar resources and services
in a similar way. As a result, this reduces the programming and time required
to form and debug a program while ensuring that users can manage, watch,
and control system hardware across an instinctive interface.
If you want to optimize Operating System services to an exact hardware area,
the Operating System will have to utilize a large database of computer
drivers. Although any software may likely make an introduction call to the
storage media, the Operating System will get the call and call on the close
driver to change the call into commands needed by the hardware resources on
a particular computer system. Currently, the Operating System works as a
robust interface for locating, configuring and controlling several hardware,
including memory management, processors, and processing modules.

Definition of UNIX
UNIX is a multitasking, multiuser, time-sharing, and portable OS initially
created in 1969 by a gathering of people at AT&T. UNIX was first
customized in low-level computing idea yet was reinvented in C in 1973.
UNIX has been ported to more machine families than some other OS.
Accordingly, it has come to be related to the idea of open systems. Unix
Operating Systems are broadly utilized in PCs, workers, and cell phones. The
UNIX climate was additionally a fundamental component in the advancement
of networking and the internet.
UNIX was created based on the way of thinking that the system power comes
from the connections among programs, instead of on the actual projects.
UNIX programs are composed to do a particular thing great, and projects are
composed with the goal that they cooperate. AS a result, UNIX engineers
uphold effortlessness, movability, and clearness in the plan.

Difference between Linux and UNIX


While both UNIX and Linux are important for use, there are still some
notable differences between the two.
UNIX is a multi-user OS and you must pay before using it. In fact, it is not
also open source. It was created in 1969 by the Ken Thompson group at
AT&T Bell Labs. Furthermore, UNIX can be used on workstations, servers,
and so much more.
On the other hand, unlike UNIX, Linux is an open-source multi-user and
multi-tasking OS. It was first created by Linus Torvalds in 1991. According
to numerous users, Linux Operating System is mostly operated in
smartphones, mainframes, desktops, and so much more devices.
Here are the major differences between Linux and UNIX:

In terms of development: While UNIX is not open-source and


was created by AT&T Bell Labs, Linux, on the other hand, is
open-source and was created by the Linux community.

In terms of supported file systems: UNIX is supported by gpfs,


ufs, zfs, fs, xfs, and hfs. Meanwhile, Linux is supported by
NTFS, Ext2, FAT32, Ext3, FAT, Ext4, Btrfs, Jfs, Xfs, and
ReiserFS.

Cost: While UNIX is known as a licensed Operating System,


Linus is free to use.

Usage: UNIX is majorly utilized on PCs, servers, and


workstations while Linux is majorly utilized in servers,
mainframes, desktop, and smartphones.

Target processor: CUnix supports Itanium and PA-RISC while


Linux supports Intel’s x86 hardware processors.

Default Shell: For UNIX, it is Bourne Shell, while for Linux, it


is Bash (NB: In this instance, Bash also means Bourne Again
Shell).
CHAPTER TWO

Benefits of Linux
Linux is an OS similar to Mac OS and Window that also has several
distributions and variations due to its modular design. The Operating System
can schedule apps, manage basic devices, and control file system services.
As a matter of fact, Linux has several benefits as compared with other
operating systems, and no wonder why it is mostly utilized in nearly all fields
in the current world, including supercomputers, home appliances,
smartphones, cars, and others.

1. Open Source
One of the essential advantages of Linux is that it is an Open Source
Operating System. For instance, its source code is easily available for
everyone. Anyone fit for coding can contribute, change, overhaul and circle
the code to anyone and under any circumstance.

2. Security
Linux is more secure interestingly unlike other OS like Windows.
Furthermore, Linux isn’t absolutely secure as there are some and it is less
vulnerable than others. Each program in Linux whether an application needs
authorization from the administrator (NB: The authorization usually comes
in form of a password).

3. Reestablish older computer systems


Linux assists you to use your old Computer Systems as a firewall, switch, file
server, and others. There are various distributions open to using depending on
your system abilities. (NB: For instance, low-end systems usually use
Puppy Linux).

4. Customization
This is one characteristic that offers a massive benefit over other OS. In
Linux, you are free to customize any feature, include and remove any feature
depending on your needs as long as it is an open source OS.
Asides from this, several beautiful icon themes and wallpaper can be added to
provide a stunning design to your system.

5. Software Updates
You will experience a great number of software updated when using Linux.
The software updates are very fast than other updates in some OS. Finally,
updates carried out in Linux can be easily achieved without encountering any
critical issue.

6. Several Distributions
There are numerous distributions made available and they can also be
referred to as Linux distros. It gives several options to users. Users can pick
any bistros depending on their preferences. A few bistros of Linux are
Ubuntu, Debian, Linus Mint, Fedora, Arch Linux, and so much more.
As a newbie, you can utilize Linux Mint or Ubuntu. Meanwhile, if you have
some years of experience as a programmer, you can utilize Fedora or Debian.

7. No payment to be made
Linux is free to use on the internet (NB: You only need to download and
begin using it). With Linux, you are not mandated to purchase the license
because a great deal of the software has GNU General Public License.
In fact, the free-to-use advantage was regarded as one of the major benefits of
Linux over Windows and other OS. In the case of Windows and other OS,
you will have to spend a huge amount of money to obtain the license.

8. Immense Community Support


Scenes and mediums by happy users are created on the internet to assist and
deal with the issue in which other users are encountering. There is a huge
load of committed programmers who are willing to assist you when you have
any issues.

9. Privacy
Linux makes sure the privacy of user’s information because it won’t request
or collect personal information from the user when it’s software or
distribution is in use.

10. Stability
Linux provides enough stability, and there is no need for it to reboot after a
short time. Going further, the Linux system hardly ever freezes or becomes
slow. Unlike in Windows, where you need to reboot your system once you
install or delete an app, the Linux system does not have this issue.
Developers of Linux have also made it clear that the system can work without
any interference.

11. Performance
Linux gives a high and stable performance on several workstations and
networks. Also, it permits a high number of users to work at the same time
and it handles them professionally

12. Network Support


Linux provides support for network functionality as made available by
programmers over the web. Additionally, Linux assists users to set up server
and client systems on computer systems without any hassle and it is usually
done quickly.
13. Flexibility
Linus gives a large range of flexibility, allowing you to install only needed
parts. For now, you do not have to install a full suite. Linux developers will
also advise you to store Linux files below several partitions (NB: This
should be done in case one of the Linux files gets corrupts, allowing you
not to encounter any loss at all and retrieve your document easily).
As a Linux user, what you only have to fix is the exact partition and not the
full file which you must carry out when using other operating systems like
Windows.

14. Compatibility
Linux performs all available file formats, and it also permits a huge number
of file formats.

15. Fast and easy installation


Linux developers sought to make Linux easy to install from the internet and
they also achieved it. To install Linux from the internet, you do not need to
table down anything because it is capable of running on any hardware,
including your outdated systems.

16. Adequate use of Hard Disk


Linux carries out every operation efficiently, including when the hard disk is
nearly occupied. As a result, it raises the performance of the Linux (NB: This
makes Linux offer high performance to its users as well).

17. Multitasking
As we have mentioned earlier, Linux is a multitasking OS because it can
carry out several operations at the same time without any reduction in speed
like downloading a huge file (NB: This is a very important benefit because
other low-end systems and PCs might not be able to multitask effectively,
and even if they do, the download speed will be drastically reduced).

18. Run several desktops


Linux gives several desktop environments to simplify its use. At the time you
are installing Linux, you can select any desktop environment depending on
your needs like GNOME and KDE (NB: While KDE means K Desktop
Environment, GNOME means GNU Network Object Model Environment).

19. Run various work regions


Linux gives distinctive work region conditions to simplify it to use. While
presenting Linux, you can pick any work territory environment according to
your longings like KDE (K Desktop Environment) or GNOME (GNU
Network Object Model Environment).

How to Choose Linux Distribution

Choosing or selecting a Linux distribution can be one of the most challenging


tasks for a Linux user. Numerous amazing choices have their own special
durable suites.
In addition, there are regular updates, general community information, and
news that make the process of choosing a Linux distribution even more
challenging. Meanwhile, to make the process a bit easier to choose a Linux
distribution, some questions will assist you in your decision (NB: While
asking yourself some questions, you should also remember that you should
try as much as possible not to make the wrong choices because they can
ruin you and your hope to creating a magnificent design).
Here are some of the questions that will enable you to choose a Linux
distribution easily:

1. Server vs. Desktop


This is a very fundamental question you should ask yourself when choosing a
Linux distribution. You need to know if you want to run the distribution on a
server or desktop. The requirements for both distributions are not the same.
For instance, server distributions require to be strong and stable, while it is
perhaps much better to have an updated software when you choose the route
or desktop distribution.
More so, if you choose to run a server, you need a long release cycle, support,
reliability, and a compatible version of the software you need. On the other
hand, when it comes to desktops, you don’t have to get a long release cycle.
You simply have to get a new version of your applications. You can also get
a rolling release that will permanently keep you on the bleeding edge.
Although stability is important, it is not a crucial requirement.
Instead, you will have to get a graphical desktop environment and a
distribution that offers something that will attract your eyes.

2. Desktop: Beginner vs. Advanced


Perhaps, if you will be running Linux on your desktop, you need to also
inquire from yourself if you want a beginner or an advanced Linux type.
There are several Linux distributions such as Ubuntu, but ensure your choice
is user-friendly.
On the other hand, there are also Linux distributions such as Arch and
Gentoo Linux that allow you to do anything you want with your system such
as breaking it differently and explicitly. Furthermore, the distributions allow
you to have control over your system and you can form amazing custom-
tailored outcomes (NB: The disadvantage with it is that you may likely not
get what you expect, and it takes a huge amount of time to maintain).
Ensure you do not allow the Beginner Linux distribution to deceive you. Here
are some of the differences between a Beginner and an Advanced Linux
distribution:
Beginner: SolusOS, OpenSUSE, Linux Mint, Ubuntu, Fedora, and
ElementaryOS
Advanced: Slackware, Debian, Gentoo, Arch Linux, and OpenSUSE
Tumbleweed
After deciding if you will get a beginner or advanced Linux distribution,
some crucial factors differentiate them from each other.

3. Software Repositories
A software repository is another factor you need to consider when choosing a
Linux distribution. In this case, you should be bothered about how much and
the kind of software seen in the repositories. In a case whereby a distribution
is without an application you require, it may be a worry for you. For instance,
Fedora and Ubuntu have high software repositories and large third-party
support. If you want to use your desktop for everyday operation and
multimedia, you should consider getting Ubuntu.
A few Linux distributions such as Debian do not ship alongside non-free
software and places it in a different repository and this is something you need
to take into consideration.

4. Hardware Resources
The main reason Linux has continued to sell is that it can cut down and
utilize little resources that are made available. In fact, Linux can also utilize
outdated computers and make them functional once more with little resource-
intensive systems.
There are several amazing distributions that seek to be as light as possible,
including Linux.

5. Desktop Environments
Since your eyes will mostly be focused on your desktop environment
consistently, it means you need to choose a Linux distribution that is actually
worth it. Also, you need to choose a Linux distribution with a comfortable
and good desktop environment that will not give you any issue while using it.
Perhaps, if you have not utilized Linux in the past, you should get a Linux
distribution with an attractive desktop environment such as GNOME. Also,
other desktop options can be found in the same Linux distribution. For
example, Ubuntu has something referred to as flavors that also have different
desktop environments.
Meanwhile, other advanced Linux distributions such as Gentoo and Arch
Linux do not have a default desktop environment and they do not ship
alongside a desktop environment. Instead, you are expected to install and set
it up by yourself. From a positive angle, you are free to select from any
desktop environment as you wish.
To emphasize desktop environments, they are important because they dictate
with tools that are present when you install them.

6. Update Cycles
It would not be a welcome development if you have a desktop computer that
is unwilling to update to new applications with amazing features due to one
reason or the other. This is the reason you need to search for how frequently
your choice of Linux distribution releases a new version and the software it is
allowed to update in its repositories.
This point is the tricky and confusing aspect because there is no
straightforward and particular Linux distribution you can choose that can
update software for you. On the other hand, running or using the latest and
new software always can lead to things breaking. For example, Linux
distributions such as Arch Linux is known to always lead to breaking when
its software is updated.
Other Linux distributions such as Gentoo, OpenSUSE Tumbleweed, and
SolusOS do not have a particular version (NB: Distributions without
updated software will always update once their respective software is being
released). It also means that you will never find a hard obstruction to
obtaining new software.
A few distributions that stay in the center ground between old and bleeding
edge are Linux Mint, Debian, ElementaryOS, Ubuntu, SolusOS, and
OpenSUSE.

7. Community
It is important not to forget a distribution community. In this instance, the
community includes people you will ask for solutions from when something
does not go as planned. (NB: Don’t be deceived into believing that
everything will go smoothly because you will surely experience one issue or
the other as you journey along).
For reference purposes, the Ubuntu community is large and it is saddled with
the responsibility of helping Linux beginners. Ubuntu community cannot be
compared with the Arch Linux community because the latter expects that you
to have achieved some level of professional skills.
The Linux community will also be called when it is time to pack software
away from the default distribution repositories. Once more, Ubuntu’s large
number of community members is a huge asset and whenever a person
certifies or supports Linux, they will package the software for Ubuntu. More
communities are identified for packing new software and Arch Linux’s AUR
repository is packed with software in which the community arranges and
maintains for Arch Linux users.

8. Severs: Flexibility vs. Enterprise


Whenever you are choosing a Linux distribution for your servers, the worry
is totally different when choosing with a desktop. In this instance, you will
have to get a system that will never disappoint you. In case the system
disappoints you, you will have to find a way to fix it immediately.
Running an ultra-long term support distribution may seem like a fantastic
idea until the internet app you created will fail to run because the entire
software in the repositories is old. The only solution is to make everything
balance. By making everything balance, we mean a web server should have
some form of flexibility. Also, web technologies are growing by the day and
you wouldn’t want to see yourself custom assembling everything to get your
web application working once again.
However, it may not be the worst situation if your email server is old but
does not change. This is because email servers are infamously hard to
configure, and it is always better if they remain safe, secure, and stable.
Additionally, database servers can also be on the center ground, and it is
usually based on what type of thing the database will serve. Also, the
database for a web app may require a couple of new features to make the
software keep on communicating daily. However, if you are using an internal
DB for records, you may have to get something very simple and stable.
Linux distributions made for the enterprise usually have unbearable long
support for windows that do not change. Meanwhile, distributions that serve
different purposes usually move faster and permit for a little flexibility in
your software option.
Here are some recommendations when choosing servers:
Flexible: Debian, Gentoo, and Ubuntu
Enterprise: Debian, Slackware, RHEL, and CentOS

Ubuntu and Linux Mint


This type of Linux distribution is perfect for beginner and advanced users. It
is presently the most used Linux distribution worldwide. The Ubuntu and
Linux mint is built on a Debian core, and it has added a constant release
cycle.
One beautiful thing about using the Ubuntu and Linux Mint is easy to use and
it is backed up financially. Additionally, it is a free distro, hence, copyrighted
materials like DVD playing software are not represented with Ubuntu,
meaning you are mandated to download and install it differently.
Lastly, Linux Mint is dependent on Ubuntu, and it is specially made for
novice users and it also offers a KDE and GNOME version.

SuSE Linux
As you have with Ubuntu and Linux Mint, the SuSE Linux is also suitable for
beginners and advanced users. Formally, it was a free German Linux
distribution, which, after some period, was bought by Novell, and who
further went ahead to sell it to VMWare. SuSE Linux is an amazing all-
rounder Linux which is prepared for the Enterprise.

Red Hat/CentOS/Fedora
The Red Hat/CentOS/Fedora was formally a common Linux installer, but it
has slowly faded away in terms of popularity. The good thing about this
Linux installer is that it is easy to use, although it has a little frustrating twist,
it is still a software package that is guilty of dependency issues, added with
the YUM system.

The software is not a free Enterprise version, and it has full phone-based
support supported by tough experiments. On the other hand, CentOS is
regarded as the free version which is gotten from RHEL but it cannot be
compared to the former.
Lastly, Fedora is regarded as the bleeding-edge fork of Red Hat which
includes all its recent whistles and bells and it is capable of suffering from
low stability than the other enterprise list.

Debian
Perfect for intermediate and advanced users. It is well built for Linux
distribution and it also includes a joint effort with an apt-get system to correct
the issue of the RPM software packaging in SuSe, Mandriva, and Redhat.
Popular known for having an edge over other Linux distributions, it is
regarded as the solid distribution for modern users because it is easy to
distribute like Linux Mint and Ubuntu.
Slackware and Arch Linux
It is good for advanced and server users. Slackware was identified as the first
and original Linux distribution. It is also focused on geeks who prefer to
change their settings. A drawback regarding Slackware is that it is difficult to
install and use. In fact, Slackware uses .tar.gz packages and not the common
.deb or .rpm systems.
If you are an advanced user but you do not like to use the Slackware
distribution, you may opt instead for Arch because it offers nearly the same
level of customization as you have with Slackware.
CHAPTER THREE
Basic Linux Commands
Check below for a list of the basic Linux commands:

1. Pwd: After launching the terminal, you will be taken to the


home directory of your user. To be sure of the exact directory
you are in, you can simply utilize the “pwd” command.

2. Ls: Utilize the “is” command to be sure what files are present in
the directory (NB: You can view the entire hidden files by
utilizing the command identified as “is-a”.

3. Cd: Utilize the “cd” command to open a directory. For instance,


if you are present in the home folder, and you will move over to
the downloads folder before entering “cd downloads”. (NB: Be
sure to know that this command is case sensitive, and you need
to enter in the name of the folder the way it is).

4. Rmdir and mkdir: Utilize the mkdir command whenever you


have to create a folder or a directory. For instance, if you need to
create a directory referred to as “DIY”, you should enter “mkdir
DIY”.

5. Rm: Utilize the rm command to delete both directories and files.


You can also specify what you will like to delete by simply
entering “rm-r” to delete only the directory.

6. Touch: This particular command is majorly used to make a file.


Additionally, the touch command can be just about anything,
inkling an empty zip or empty txt file.

7. Man and –help: To get more information as regards a particular


command and how to utilize it effectively, simply use the man
command. The man command will display the manual pages of
the command.

8. Cp: Utilize the cp command to copy files by going through the


command line. It requires two arguments; which are simply the
location of the file to copy and where it is meant to be copied to.

9. Mv: Utilize the mv command to move or change the location of


files through the command line (NB: This command also serves
people that want to rename a file).

10. Locate: Use locate command to find a fine in a


Linux system, and it serves the same purpose as search
command in Windows. You can easily call on this command
when you are not particularly sure where you stored a file or the
exact name of a particular file.
CHAPTER THREE
Installing Linux
What type of PC is needed?
The type of PC needed for installing Linux will depend based on what
operation you want to carry out with your Linux. In most cases, the system
requirements usually range from an outdated Intel 386 to a modern PC.
Users can run Linux on a bit strange hardware like ARM-based machines,
Macintosh, and so much more.
So, to determine the type of PC you need to install Linux, we will have to
discuss the type of CPU, RAM, hardware, Video card and so much more that
are required.

CPU
Linux was initially made available on the Intel 386 around the early ’90s, but
it is not a perfect representation or meaning that the Linux will perform better
on a PC other than a Macintosh PC. In the modern world, Linux desktop is
common on AMD, Intel, and PPC processors, hence, a majority of the used
software is made on the platforms.
If you own a different platform like Atari, Amiga, ARM-based processor, and
Sparc, Linux will be surely different because most software titles may not be
present for a particular platform.

RAM
RAM or Memory is another crucial requirement when planning to install a
Linux distribution. Without a doubt, a majority of the used Linux
distributions at this time need at least 1GB to use.
Meanwhile, if you are planning to utilize Linux for non-graphical reasons,
like firewall, or web page hosting, you are free to run a basic installation of
Linux. A few of the basic Linux installations will usually run on 8MB. On
the other hand, if you want to have a mainstay about using Linux and you
want the best performance, then you should consider using a higher RAM.
The point is that the higher RAM you use, the better for your PC and Linux
because it will run without any issues. But if you decide to only the Linux at
home, you must get a minimum of 1GB RAM because that is the least
storage capacity that can withstand any operation.
With more tough and challenging operations and functions such as editing
artwork, audio, editing movies and so much more, you need to get at least
2GB RAM and even more. Additionally, server users who will like to hold or
host several websites must get at least 4GB or 8GB RAM, but small server
users will not mind using only about 1GB of RAM.

Video Card
The required video card or graphics adaptor needed for Linux is just a bog-
standard one. Also, it is preferable to get an SVGA adaptor in your computer
system that has sufficient RAM to support resolutions of a minimum of 1024
x 768.
Furthermore, Graphics Accelerator cards of numerous kinds are supported by
modern distribution and present for even quicker graphics. More so, if you
need a good graphics performance in Linux, the NVidia range is a good
choice, this is because they are supported under Linux.
In addition, ATI cards are also a common option, but their driver support for
Linux does not seem to be an excellent option as compared with NVidia. As a
potential user, if you are confused about the kind of card you need, it is best
to simply visit your device manager in Mac OS or Windows. Also, integrated
graphics chipsets like Cirrus Logic and intel I Series are not bad either.

How to Install a Linux Distribution


Now, we have arrived at installing Linux. Before we get started, Linux is an
operating system that permits users with an understanding of programming to
change and form their operating system depending on their needs.
There are tons of Linux distributions including Debian and Ubuntu, however,
all Linux distributions run over a Linux server.

Steps to take to install Linux with USB Stick or CD-ROM


First of all, download .iso or go ahead to download ISO files on a PC over the
internet and keep it on the USB stick or CD-ROM after you have made it
bootable with UNetBootin and Pen Drive Linux.
Once you have achieved the above steps, you can now proceed to install
Linux properly by following the steps below:

1. Boot into the USB Stick


At the initial stage, you will have to reboot your PC after joining a pen drive
or CD-ROM into the PC. Then hit Enter when it has booted before selecting
the pen drive or CD-ROM option to begin the additional booting process.
You can attempt a manual booting process by pressing F12 to begin (NB:
Holding F12 will permit you to choose from several boot options prior to
starting your computer system).
The entire options, notwithstanding if it is either CD-ROM or USB will
provide you with a list which you are expected to choose one (NB: After this,
you will find a new screen whenever your computer boots, and it is known
as “GNU GRUB”. It is a boot loader that takes control of all installation
processes on Linux. Be aware that the screen will be displayed if there are
numerous operating systems).
Here is what you have to do when booting into the USB stick:

Proceed to set the keyboard layout


At this point, your computer system will ask you the type of
applications you would prefer to install to begin using Linux
(NB: In most cases, the two options which will be made
available for you to choose from including Minimal and
Normal installation)
2. Derive Selection
Here, you need to choose the drive for installation of the operating system to
complete. You can choose the option which reads “Erase Disk and install
Ubuntu”, especially if you will like to replace the former operating system.
But if not, simply choose the option which reads “Something else” and
select Install Now.

3. Begin the Installation process


Now is the time to start the installation process. At this point, a little panel
will request verification or confirmation to start the installation process.
Choose Continue if you do not want to alter or modify any information made
available. Also, choose your location on the map and proceed to install
Linux.
The next step requires you to input your login details before Linux can be
installed.

4. Conclude the Installation


Once the installation process is complete, you will find a prompt asking you
to restart or better still, reboot your computer system. Furthermore, you can
also choose to download drivers depending on your needs by opening the
System Settings menu.
Simply adhere to the steps below to complete the installation process:

1. Choose Additional Drivers and from the available list, also


choose the graphics driver (NB: Note that several important
drivers can be accessed in the list, and a common example is
Wi-Fi drivers).

There are numerous other options to follow if you choose to install Linux.
Installing Linux using Virtual Box VMWARE
Requirements to install Linux using Virtual Box VMWARE:

Stable and fast internet connection


Minimum of 12GB free space
Minimum of 4GB RAM
Here are the steps to take to install Linux through this means:

1. First of all, download the Virtual Box from the original Oracle
Virtual Box site.
2. Proceed to install Linux using Virtual Box: Once you have
downloaded the Virtual Box, you are now free to install Linux.
Simply utilize the .iso file you downloaded from the web and
begin the Virtual Box. (NB: At this stage, we have to assign or
give RAM to Virtual Operating System. Also, the least RAM
should be 2GB).
3. Go on to select an option below the one which reads “Create a
virtual disk”.
4. Select the kind of storage you will like on your hard disk before
proceeding to select the disk with the least size of 12GB.
5. Select the option which reads Create option and proceed to select
the START button to commence the Virtual Box and browse
through while navigating to the location of the .iso file.
6. At this point, Linux Operating System will begin, so choose to
Install.
7. Choose the drive for completing the Operating System
installation. Choose “Erase Disk and install Ubuntu” if you no
longer need the former Operating System. However, if you still
need the previous Operating System, simply click “Something
else: and select Install Now.
8. Choose Continue and select a valid username and password.
9. Wait for a while, probably around 15 minutes for the Linux
installation to come to an end.
10. After the installation process is completed, it is
always best that you restart or reboot your system (NB: If you
encounter any issue while waiting for the installation process
to complete, you are expected to close and reopen the Virtual
Box for the installation process to commence once more).
CHAPTER FOUR
How to copy an ISO file to CD or DVD
Copying an ISO image to a CD is not similar to dragging and dropping the
file from the download section and copying it once more to an empty USB
stick or DVD (NB: Hence, you will have to burn the disk image on the
media before doing any other thing).
There are a plethora of methods to place an ISO image on a USB stick, and it
is a very easy step to take. Windows users can easily achieve this feat by
operating a free tool identified as Rufus.

Check below for the steps needed to copy an ISO file to CD or DVD:

1. Select your USB stick (NB: This option can be found from the
drop-down menu referred to as “Device”).
2. Look towards the right side of your screen and you will find a
CD icon alongside a small box below it. Ensure you select it a
wait for a dialog box to be displayed. Once it has successfully
been displayed, take the time to find the ISO file you earlier
downloaded and launch it.
3. Select Start.
4. The next screen will prompt you to verify if it is Ok to download
the SYSLINUX software. You are expected to select the Yes
option.
5. After completing the above step, you will find a dialogue box
concerning an ISO Hybrid image. Choose OK.
6. Also, verify that you clicked your USB stick. (NB: Be sure you
did not select another one and be sure to know that any data
you stored on your USB will be removed).
7. Once all is done, proceed to restart your PC.
About Sort Command
The sort command assists you in either order or sort lines in text files. Users
can sort the information in a text file and show the output on the screen (NB:
Otherwise, users can also redirect the output to a file).
Depending on your needs or requirement, the sort command gives you
numerous command-line options for sorting information in a text file.

Here is an example of a Sort Command Syntax:


For instance, check out the below test file:

Also, the below contains the outcome of the result when sort command is
carried out on the file without performing any other option (NB: What it does
is to simply sort lines in test file and shows the sorted result).
CHAPTER FIVE

How to sort files


Here is how to sort files:

1. Carry out Numeric Sort with –n option


If you decide to sort on the numeric value, you can utilize the –n or –
numeric sort option.
Simply make or form the below test file for the below instance:

The below sort command sort lines in test files on numeric value in the initial
word of line and shows sorted result.
2. Sort Human Readable Numbers with –h option
If you choose to sort on human-readable numbers like 1G, you should ensure
you utilize the h or –human numeric sort option.
You can form the below test file for the below instance:

The available or below sort command will sort human-readable numbers like
1K which equals 1 Thousand in the test file and shows the sorted result.
3. You can Sort Months of any Year with –M option
If you decide to sort in the order of months in a year, you can utilize the –M
or –month sort option.
Simply form the below test file for this instance:

The below sort command will sort lines in the test file based on the months
(NB: Be aware that lines in the file should have a minimum of 3 character
names of the month name at the beginning of the line. This means if we
provide ja meaning January, it means sort command will not look at it only
based on month name).

4. View if the content is previously sorted with the –c option


If you want to view or verify if data in a text file is already sorted or not, you
should ensure you utilize the –c or –check = diagnose the first option.
Form or make the below test file for this instance:

The below sort command will view if text file data is already sorted or yet to
be sorted. In case the data is not already sorted, it will display the first
occurrence with line numbers and values that are not arranged.

5. Reverse the result and view for distinctiveness with –r and –


u options
If you need to get sorted results in reverse mode, it is advisable to utilize –r or
–reverse options. On the other hand, if the file has multiple lines, to achieve
special lines in the sorted output, simply utilize the –u option.
Form the below test file for the instance we are presenting to you:

The below sort command sorts lines in a test file in reverse mode and show
the sorted result:

Also, the below sort command sorts lines in test file in reverse order and
deletes multiple lines from the sorted result:
6. Carefully sort the content, modify delimiter, and write the
result to a file with –k, -t, and –o options
If you will like to sort the word position or column in lines of text file, you
should use the –k option. Meanwhile, if each word in every line is made
different by delimiter asides from space, you can easily specify delimiter with
–t option.
Furthermore, you can get sorted results in any given output file with the –o
option and not showing output on standard output.
Form the below test file for this instance:

The below sort command sorts lines in the test file on the third word of every
line and shows the sorted output:
In this case, multiple options are utilized at the same time. In the case of the
text file, words in each line are parted away by delimiter I.
Open and Edit Files
Linux file system permits you to run several operations on file such as edit,
create, multiple Linux editors such as nano, Gvim, Vim, Emacs, Gedit, and
others.

Editing files in Linux


Check below for the steps to edit files on a Linux server over several text
editors:

1. Edit files with VI editor


This is the most used text editor in Linux. The VI editor has several models
such as normal mode, line mode, insert mode, command mode, and others.
Each of these modes permits you to operate its unique operations.
Furthermore, the VI editor is also regarded as the most used text editor in
Linux because of its modality. A majority of the tools contain a single mode,
hence, they collect input and carry out the commanded operation, but VI has
numerous modes.
Once the VI editor begins, it will launch with normal mode, which is known
as the command mode. Notwithstanding what is being entered in this mode, it
is always seen as a command and not input.
In some instances, it looks to be like a usual editor, but when it is being used
frequently, it will seem like the best editing tool.
Prior to editing files, you should know how to change a mode in the VI
editor. Thankfully, here are some of the ways to change a mode in VI editor:

Hit I key for insert mode.


Hit ESC for normal mode.
Hit :w test.txt to save the file as test.txt
Hit :wq! To save the new file and close the editor
Hit :q! to close from the editor and not save the file
If you decide to edit a file, you should ensure you create a file by utilizing the

cat command:
All the commands listed above let you enter the content of the file, enter the
content of the file on the terminal, and hit CTRL + D to save the file.

2. Edit files using a nano text editor


Unlike VI editor which is a very popular editor in Linux, Nano is pretty much
straightforward. Going further, it is a built-in editor for Linux distributions
and you do not really need to know so much about nano editor before
utilizing it.
As regards nano, no primary command is utilized to operate or run on the file
(NB: This simply means the entire basic operations are shown on the lower
part of the editor). It is possible to start each of them with the CTRL key, for
instance, to save the file, simply hit CTRL + O, to close it from the editor,
simply hit CTRL + X.
To edit a file using the nano editor, launch the file from the directory where it
was kept by adhering to the below command:

The overhead command will launch the Demo.txt file with a nano editor.
Meanwhile, if you choose to edit the file, simply move the cursor and enter
your preferred text, and hit CTRL + O to save the file.

3. Edit file with Emacs editor


Going further, the Emacs editor also permits you to edit files. Furthermore, it
has numerous built-in features like a web browser, terminal, calendar, and
others. Emacs editor works just like a normal text editor and you can edit
files and save them by navigation bar.
Although it does not come as a built-in editor in Linux, but it can be installed
using the terminal. If you decide to install Emacs editor, launch the terminal
by pressing CTRL + ALT + T and run the following command:

The top command will ask you to input your admin password, so you are
expected to enter the password and hit ENTER.
CHAPTER SIX

How to Create a Collection of Files


Creating a file and a collection of files is a very essential knowledge that
every Linux user is expected to know. Users can create a new file either from
the desktop file manager or from the command line.
Before creating a new file, you will have to write permissions on the parent
directory (NB: If you fail to do this, you will get a permission denied error).
Also, if you decide to show the contents of a directory, simply utilize the ls
command.

How to Create a File Using the Touch Command


The touch command permits users to update the timestamps on former files
and directories and create empty and new files. The touch command is also
the simplest and knowledgeable way to create empty and new files.
If you choose to create a new file, you are expected to execute the touch
command, afterwards, go through the name of the file you will like to create:

In a case whereby the file file1.txt does not come up, then it will be created
(NB: But if it formally existed, only the timestamps will be changed). To
create several files at the same time, simply specify the name of the files but
ensure you space them like the below example:

How to Create A File Using The Redirection Operator


Redirection lets you capture the result from a command and deliver it as input
to another file or command. You have two methods to redirect output to a file
Additionally, the > operator has to overwrite a former file, while the >>
operator will attach or add the result to the file.
Creating an empty zero long file needs you to specify the name of the file you
will like to create after the redirection operator:

The above command will be the straightforward command to create a new


file in Linux (NB: Whenever you choose to create a file with a redirection,
be cautious enough not to overwrite an essential or crucial existing file).

How to Create a File Using the Cat Command


The cat command is basically utilized to read and concatenate files, but it is
also utilized for creating new files. If you decide to create a new file, simply
run the cat command and then the redirection operator > and the file name
you want to create.
Then Hit Enter, followed by the text and after that, hit the CTRL + D to save
the files:

How to Create a File Using the Echo Command


The job of the echo command is to print the strings that are given as
arguments to the standard output, which can also be sent back to a file. To
create or form a new file, simply run the echo command after the text you
will like to print and utilize the redirection operator > to write or enter the
output to the file you will like to create:

If you decide to create an empty file, utilize the below command:

How to Create a File Using Heredoc


Heredoc also referred to as “Here document” is a kind of redirection that
permits you to pass several lines of input to a command. This particular
method of creating files is majorly utilized anytime you decide to create a file
that has several lines of text from a shell script.
For instance, to create a new file file1.txt, you need to use the below code:

The main part of the Here Document usually includes special characters,
commands, and variables.

How to Create a Large File


In some instances, you may decide to create a large data file. This is usually
essential anytime you decide to test the write speed of your driver or the
download speed of your connection.

Creating a large file with the dd command


The dd command is majorly utilized to change and copy files.
To create a file with the name 1G.test alongside a size of 1GB, you need to
run the following command:

How to use the fallocate command


The fallocate command is a command-line utility designed to give real disk
space for files. Check below for the command that is named 1G.test
alongside a size of 1GB:

How to Compress Files to Save Space


There are a plethora of tools to compress files to save space on Linux,
however, they do not act similarly or produce the same compression level.
Check below for the list of tools you can utilize to compress files to save
files;

1. Tar
The tar command is not precisely a compression command. It is majorly
utilized to get some files in intone file for easy conveyance to another system.
Tar also gives compression feature which is exceptionally a good choice.
After compression is included in a tar command alongside the z option, it
utilizes a gzip to complete the compressing process. Tar can also be used to
compress one file as a group, although it does not present a benefit over
utilizing gzip.
In order to use tar for this operation, simply specify the file like you would
have done as a group of files using the tar “cfz newtarfile filename”
command. If you like, users can utilize the tar.gz extension which is likely to
make the file character seeable, but a majority of Linux users will most likely
see tgz to mean the same thing (NB: Users will have both the compressed
and first file whenever the compression is done).
To retrieve several files and compress the result in a single command, simply
utilize the same basic syntax, but ensure you specify the files to be added as a
group and not the single file.

2. Zip
The zip command forms a compressed file and does not touch the original
file. Also, the syntax is easy but need to remember that your first file should
be the final argument on the command line.

3. Gzip
The gzip command is very easy to utilize. You simply have to enter gzip after
the name of the file you will like to compress. In contrast with the other
commands, gzip will encrypt the files in their right location (NB: This means
the original file will be replaced by the encrypted file).
Here is an example:

4. Bzip2
In similarity with gzip command, bzip2 will compress or reduce the file you
have selected, and not the original file.
Here is an example:

5. XZ
This is a new compression tool and you only need to give the file name to the
command. Once more, the original file will be compressed in the right
location. Check below for an example:

Coming to large files, you will see that xz will require more time to run than
other compression commands, but the compression outcome is brilliant.
CHAPTER SEVEN
Alternatives to Microsoft Office

Microsoft Office is long-existing productivity software. Perhaps, if you are in


search of another option because of performance, price, or you do not like
any of the Microsoft products, you should not worry because there are tons of
available options.

Here are some of the alternatives to Microsoft Office:

1. Google Workspace
The leading Microsoft Office option for businesses is Google Workspace
which was previously known as G Suite. The joint effort of Google Docs,
Google Sheets, Google Forms, Gmail, and so much more to deliver quality to
users.
One amazing thing about Google Workspace is that it works amazingly well
on Linux, Max, Windows, and other PCs that run on the latest web browser.
Users can easily combine their effort and share any content without having to
download it. Asides from that particular feature, users can also add features
that can’t be found by using plugin integrations.
Meanwhile, the leading drawback to using Google Workspace is offline
usage. Although Google presents offline versions thanks to plugins on the
Google Chrome browser, they cannot be relied upon. Business users using
Google Workspace are mandated to pay the $6 for every month while non-
business users can carry out different functions while using a free Google
account.

2. Apache Open Office


If you are worried about the cost of Microsoft Office, then you should look
into using Apache Open Office. The features from Open Office come from
unpaid workers who are interested in developing the program for a wide
community to use it.

3. WPS Office
WPS Office is software that allows Android, Windows, iOS, and Linux users
can use. Although it is free, but in order to remove the adverts, you will have
to pay $30 annually. WPS Office emanates from Kingsoft (NB: Kingsoft is a
Chinese developer committed to delivering quality).
Apps under WPS Office may include WPS Presentation, WPS Writers, and
WPS Spreadsheet. This suite has a customizable interface, which means you
can choose the menu style you prefer. Additionally, it further supports tabbed
document editing, similar to what you have with a web browser.
Finally, WPS Office has an integrated cloud with 1GB storage and it is also
lightweight and quick to use.

4. Dropbox
Dropbox is particularly known for file sharing and it also presents a
competitive app majorly concentrated on word processing. In addition,
Dropbox Paper is closely and firmly integrated into Dropbox (NB: Because
of this, it is relatively easy to share files).
Furthermore, Dropbox Paper permits several simultaneous coworkers and lets
you export files in the common pdf and docs file formats. With Dropbox, you
will have a simple user interface and you can easily get a free Dropbox
account (NB: For users who wants to open a free Dropbox account, they
must have at least 2 GB of storage while intending business users should
ensure they have a larger space and cash because they will be paying
$19.99 every month).

5. FreeOffice
The FreeOffice is another alternative to Microsoft Office, and it looks so
much like it. From the name, it is easy to depict that this suite option is free to
use. Excitingly, it works on Linux, Mac, and Windows PCs and it is
developed by SoftMaker.
Popular applications made available in FreeOffice include Presentations,
PlanMaker, and TextMaker. FreeOffice also allows users to select the modern
ribbon view or the classic Windows-style menu.

Alternatives to Internet Explorer


Browsers are integral parts of any Linux, Windows, and Mac PCs because it
allows users to check what is ongoing on the internet at any time they want.
By default, Internet Explorer is the installed browser on Linux, but we have
compiled other web browsers you can install and begin using today.

They include:

1. Brave Browser
This browser was formed to block every other thing asides from website
trackers and user-allowed advertisements. Brave Browser is packed with
numerous benefits including maximum security, now web trackers,
Chromium extension support, speed, and bug tracking.
Although it is a fantastic browser to use its only downside is that the opt-in
micro payment system that supports or permits content creators has an
uncertain way to send your payments to a likely receiver.

2. Google Chrome
Without a doubt, Google Chrome is the most used internet browser around
the world. Although the first version of Google Chrome was slow, bad, and
un-inspiring, over the years, its developers have sought to raise the bars, and
this includes making the browser top-notch at all fronts.
One good thing about Google Chrome is that it includes a large list of
important built-in features simple to use and it has a fast speed. The
drawback to using Google Chrome on your Linux PC is that the browser
includes a proprietary code and it uses heavy memory.

3. Mozilla Firefox
Mozilla Firefox is the web browser that initiated open-source web browsing.
Unlike other low-class web browsers, Firefox is committed to providing
adequate security to web browsers, and it also includes several extensions
which users can explore any day and any time they want.
Asides from the above benefits, Firefox also has an equal user experience
across several systems. As you have with Google Chrome, Firefox’s
disadvantage is that it uses heavy memory and it has an HTML5
compatibility problem.

4. Konqueror
This web browser is not a common one but it delivers exciting features which
include web browsing to users and intending users. The web browser is
managed and controlled by the international KDE free software community
and Linux users can easily get hold of it.
The advantages of using Konqueror are that:
It is fast and reliable
It is pre-installed on several Linux PCs
It has customizable URL shortcuts
It has a pop-up blocker and ad-blocker
It serves as a file manager and other functions
Meanwhile, the downside of using Konqueror includes:

It majorly runs on Linux (NB: Although this is a major


disadvantage for other PC systems like Windows and Mac, but
it is an exciting advantage for Linux users because have a
browser they can differentiate from other PC systems).
It won’t function effectively if you fail to install the numerous
KDE libraries.

5. Lynx
Lynx is a special browser and it is all based on text. More so, it is an ancient
web browser that is still in full use by users. The advantages of Lynx are
numerous and they are outlined below:

It is a small web browser


Since it is lightweight, it does not require too much space
It is perfect for safe browsing and testing as well
It is relatively safe and secure for use
It also supports Windows and DOS use
Its downsides include:

It only performs text functions and nothing else.

Alternatives to Photoshop
As we all know, Photoshop is a very common photo editing software, which
also serves different and multiple functions for users worldwide. However, if
you are not convinced about the features offered by Photoshop or if you
decide to have a glance at other photo editing options, then you can try your
luck with the amazing alternatives listed below:
1. Pixlr
This Photoshop alternative is an online free and closed source image editing
software that provides users with the choice of creating exciting and
manipulative photos while using several editing tools and numerous free
effects. Although Linux users won’t be able to access this photo editing
software through an application, it is still available to be used via browsers
for free.

2. Photopea
Photopea is another free improved photo editor for creating and customizing
raster graphics online. This photo editor runs in a browser and it also efficient
locally (NB: This simply means you are free to use the photo editor when
you are offline).
Furthermore, this photo editing software is made to look like Photoshop
because its numerous features still include working with masks, layers,
filters, key binding, vectors, smart objects and so much more. Also, Photopea
supports users that work with well-known graphics formats like the sketch,
XCF, XD, RAW, and PSD.
In Photopea, there are usually adverts that are displayed but if you are not
bothered about the displayed ads, then it may be the right option for you to
use.

3. GIMP
GIMP, an acronym for GNU Image Manipulation Program is an open-source
image editing program and a free one that was formed with highly refined
tools for photography, illustrations, and graphic designs. In fact, GIMP nearly
offers similar Photoshop features including filters, color correction, layers,
magic wand, artboards, and so much more.
Users can customize GIMP to set up their likely key bindings and also apply
a skin to allow GIMP similar to Photoshop and also copy its keyboard
shortcuts. Lastly, it is important to know that GIMP can be found in the
official package repository of your Linux distribution.
4. Krita
This is a cross-platform, open-source, and free painting app to offer cheap art
tools to allow everyone to create professional and beautiful digital paintings.
If you are a lover of creating illustrations, comics, and concept art, then Krita
is your number one stop and it also offers interesting features including
brushes, pen tool, layer masks, color palette, HDR support, brushes,
artboards, undo and redo, and so much more.

5. Darktable
Darktabe is a cross-platform, open-source, and free image editing app
designed by photographers for the same photographers to use as well. The
image editing app allows users to work on digital files including RAW and
negatives images.
Like you have with other photo editing software, Darktable also offers
mindblowing features like custom filters and so much more. The excellent
thing about Darktable I that it can perform different functions including
supporting numerous image formats, zero-latency, manage colors, GPU
accelerated image processing, and so much more.
The image editing app can be found in the official package repository of your
Linux distribution.
CHAPTER EIGHT

Alternatives to Adobe Acrobat Reader


Since before time, books have been the mainstay of many countries
worldwide and they will continue to reign in several countries of the world
for many years to come. Meanwhile, with the advent of technology, physical
books have been transformed into what we call eBooks (NB: eBooks is a
form of a book that can be viewed and read online on smartphones, PCs,
and tablets).
Because of this, developers sought to create applications or platforms in
which users can view and read these ebooks without having to go through too
much stress. One of the proven ways this can be done is by downloading
Adobe Acrobat Reader.
However, in recent times, there has been the development of alternatives to
Adobe Acrobat Reader which individuals including Linux users can
download and begin reading.
The below list takes a look at the alternatives presented to represent Adobe
Acrobat Reader:

1. Foxit Reader
This reader app is a top-notch freemium PDF reader that has numerous users
due to its amazing features and performances. Foxit Reader also has a free
and paid version, which challenges the effort made by the developers of
Adobe Acrobat Reader.
One amazing feature offered by Foxit Reader is that it can annotate PDF
documents, which permits for more understanding of reading text and assists
you in summarizing texts. With Foxit Reader, users can rotate their screens,
check out several background themes, and perform a whole lot more
functions.
Additionally, Foxit Reader offers a navigation panel that includes multiple
sections of your PDF like comments, bookmarks, and so much more.
2. Evince
This is another important PDF reader in which Linux users can use and
enjoy. It is also an open-source and free document reader designed by FOSS
and it can be accessed not just by Linux users but also by Windows and Mac
users.
It is interesting to discover that Evince is the default document viewer for
GNOME-based desktop environments (NB: Although the list is endless, but
the noticeable ones include Debian, Ubuntu, and Fedora). A remarkable
and striking feature about Evince is that it can show 2 pages at the same time
and it also supports displaying files in slide shows and on the entire screens.
Furthermore, Evince also lets users switch the page view either to the left or
right-hand side. In this document reader, you will find an integrated search
system that highpoints a particular side and shows the page number where
you highlighted and you can add notes.

3. Okular
This is a cross-platform and lightweight document reader designed by
workers in KDE. It does not only support reading through PDF but also
additional file-formats including XPS, Epubs, ODF, and others. It is user-
friendly and easy to use as everything including the features is well arranged
for users.
Users can easily alter or modify the layout and remove or add a few elements.
The leading benefit of using Okular is that it offers numerous tools that have
special functions. For instance, you can utilize the text selection tool to copy
a few texts and apply other functions to them. This document reader includes
an annotation tool that includes highlighting, drawing polygons, adding
notes, and others.

4. Master PDF
As the name implies, Master PDF is a PDF reader that offers users numerous
exciting benefits, including being able to create, edit, join files, add
comments, offer signatures, and also encrypt PDF files. Additionally, Master
PDF includes several annotation tools whereby users can explore it to
highlight text, add shapes, add notes, and more into their PDF files.
Excitingly, Master PDF includes an editing window where users can edit
their annotations. As a matter of fact, the edits are different and they may
include modifying colors, adding statuses or types.

5. MuPDF
This is an open-source and free PDF reader which is popular for its
lightweight and fast response. The notable difference between MuPDF and
other document readers is the command line tools, which permit users to
create PDFs from text files, change the direction of the pages, and also
change the height and width of the screen.
All the listed document readers are alternatives to Adobe readers, and users
can explore and take advantage of them for their Linux systems and other
PCs depending on what they deem fit.

What is Shell Scripting?

Shell Scripting is an open-source computer program made to be operated by


the Linux and Unix shell. Also, it is a program to write a series of commands
for the shell to carry out.
Shell Scripting is able to join long and continuous sequences of commands
into one and easy script that can be kept and carried out anytime and it also
reduces the programming capabilities.
Before we proceed, a shell is a Unix word that means an interface between a
user and an OS service. It gives users an interface and allows human-readable
commands into the system and carried out these commands which can be run
without manual control and provides the program’s output in a shell script.
An OS consists of several parts, however, the two major parts are usually
Shell and Kernel.

Types/Kinds of Shell
The two major types of shell in Linux include:

1. C Shell: The noticeable factor in this shell is% and its other
categories include

Tops C shell also referred to as tcsh


C shell also referred to as csh

2. Bourne Shell: The noticeable factor in this shell is S and its sub
categories include:

Bourne Again Shell also referred to as bash


Korn Shell also referred to as sh
POSIX shell also referred to as sh

How to Write a Shell Script


Shell Scripts are penned down with text editors. While using your Linux
system, proceed to launch a text editor program, also launch a new file and
start entering a shell script or shell program, and go on to permit the shell to
carry out your shell script and input your script at the position from where the
shell can locate it.
Here are the steps to take in creating or making a Shell Script:

1. Make a file with a vi editor (NB: A file can also be crated with
an optional or alternative editor). Proceed to give the script file
a name using extension .sh.
2. Begin the script with #! /bin/sh.
3. Write or pen down a few codes.
4. Ensure you save the script file using filename.sh.
5. To execute the script, enter bash filename.sh.
For basic information, # is an operator also known as shebang which guides
the script to the interpreter location (NB: This simply means if you utilize #
/bin/sh, the script will be sent to the bourne-shell).
The below is a little script:

Check below for the steps to create Shell Script Programs in Unix or Linux:
Add shell commands
Commenting is very vital in any program you want to run. When it comes to
Shell programming, the syntax to include or add a comment is made available
below:

Shell Variables
Variables keep data in numbers and characters format. In the same vein, Shell
variables are utilized to keep data (NB: One thing about Shell variables is
that they can only be utilized by the shell).
For instance, the below creates a shell variable and print it:
The following is a little script that can be utilized as a variable:
CHAPTER NINE

Why you should use Linux


There are a plethora of reasons why you should use Linux over other
software platforms including Mac and Windows. In the olden days, Linux
was majorly utilized for servers and it was not known to work for desktops.
However, its ease of use and interface has developed over the past years,
hence, it has grown to be used by thousands of people worldwide.

The reasons why people should use Linux are outlined below:

1. Security levels are high


By installing Linux on your PC, you are sure to avoid any malware and virus.
In fact, the security level is so high that it cannot even be compared to other
systems like Windows.
The major reason for a high level of security is because it is open-source
software and the source code is always available to be seen. Because of this,
a large number of developers around the world have seen the code and its
mistakes have been spotted and corrected.

2. Runs on multiple hardware


Everyone should use Linux because it runs on any hardware. Furthermore,
Linux ensures they explore the system’s resources and its installation can be
modified for users and any particular hardware requirements.
As we all know, the installation process is easy and it permits users to select
the modules they prefer to install (NB: As a result, it lets users install Linux
on old hardware).
Linux runs on multiple hardware, from watches to a supercomputer and you
can revive your slow Windows PC by simply installing the Linux system.

3. Free to use
Another reason why Linux should be used by everyone is that it is free to use
and users need not purchase anything before using it. Notwithstanding its free
usage, users can still access the entire basic software and as well as numerous
educational software.

4. Open Source
This is, unarguably, the most essential part of Linux because its source code
can be accessed in the Free and Open Source Software category. What’s
more, the developer community profits from the open-source because users
and members are free to view and change the source code, which cannot be
done with proprietary software.
The open-source feature will also help more countries develop their own
Linux.

5. Easy to use
Linux is an ideal OS that offers a user-friendly and graphical user interface.
With Linux, you can access all the functions present in Windows.
Also, the Graphical User Interface has been improved because you can carry
out more commands, even without having any idea of anything.

6. Customization
Users have remarkable flexibility in modifying the system depending on their
requirements. There are several options for desktop icons, panels, and
wallpapers. Also, there are several desktop environments to select from
including KDE, GNOME, and so much more.

7. Stability
The Linux system has high stability and it is not likely to crash easily. Also,
the Linux Operating System runs very quickly as it was when it is initially
installed. Unlike what you have in Windows, you don’t have to reboot a
Linux server after every patch or update. Because of this, Linux has a very
high number of servers running on the web.
How to Partition disk
Making and erasing partitions in Linux is standard practice since storage
devices, (for example, hard drives and USB drives) should be organized here
and there before they can be utilized. Much of the time, large storage devices
are separated into different parts referred to as partitions. Partitioning
additionally permits you to separate your hard drive into detached segments,
where each segment carries on as its own hard drive. Also, partitioning is
majorly helpful if you run a different OS.
There are bunches of powerful and exciting tools for making, eliminating,
and in any case, controlling disk partitions in Linux and they include:

GPT design: The parted order can make a Globally Unique


Identifiers Partition Table GPT), while fdisk and cfdisk are
restricted to DOS partition tables.
Large disks: A DOS parcel table can design up to 2TB of disk
space, albeit up to 16TB is conceivable at times. Be that as it
may, a GPT partition table can deliver up to 8ZiB of space.
More partitions: Using essential and expanded parts, DOS
segment tables permit just 16 partitions. With GPT, you get up to
128 partitions and can decide to have others as well.
Dependability: Only one duplicate of the partition table is put
away in a DOS partition. GPT keeps two duplicates of the
partition table (NB: This is always toward the start and the
finish of the disk). The GPT likewise utilizes a CRC checksum
to check the partition table uprightness, which isn’t finished with
DOS partition.

With the present bigger disks and the requirement for greater adaptability in
working with them, utilizing parted to work with disk partitions is the right
choice to go with. More often than not, disk partition tables are made as a
component of the working OS installation procedure. Direct utilization of the
parted command is most helpful while adding a storage device to a current
Operating System.
The accompanying list clarifies the way toward partitioning a storage device
with the parted command:
1. List the partitions: Utilize partee - l to distinguish the storage
device you need to parcel. Commonly, the main hard disk
(/dev/sda or/dev/vda) will include the Operating System, so
search for another disk to track down the one you need
(examples include, /dev/sdb).

2. Launch the storage device: Utilize parted start working with


the chosen storage device. For this instance, the gadget is the
third disk on a virtual framework (/dev/vdc). It is essential to be
specific on the device you need to utilize. If you only enter
parted with the device name, it will arbitrarily choose a storage
device to change.

3. Set the partition table: Set the partition table sort to GPT, at
that point, type “Yes” to acknowledge it.

The mklabel and mktable commands are utilized for a similar reason (NB:
Which is creating a partition table on a storage device). Also, the allowed
partition tables are aix, amiga, bsd, dvh, gpt, macintosh, ms-dos, pc98, sun,
and circle. Recall mklabel will not create a partition, instead, it will create a
partition table.

4. Check the partition table once more: Reveal the data


regarding the storage device.

5. Get assistance: To discover how to make another partition,


type: (parted) help mkpart.

6. Make a partition: To make another partition, you are expected


to enter the following.
Filesystem type (fstype) won’t make an ext4 filesystem on/dev/vdc1. A DOS
partition table’s partition types are extended, primary, and logical. More so,
in a GPT partition table, the partition type is utilized as the partition name.
Giving a partition name below GPT is an absolute necessity; in the above
model, the primary is regarded as the name and not the partition type.

7. Save and close: Changes are consequently saved when you


close the partition. To close, simply enter the following.

Features of Ubuntu 20.04 LTS


Owning to the release of the Ubuntu 20.04 LS, there are new features that
come with it. The Ubuntu 20.04 codenamed Focal Fossa has numerous
features which are made available below:

1. Added default theme variants


In the former version, the default theme brought about a dark version.
Meanwhile, the new Ubuntu 20.04 adds to the 3 variants of the default Yaru
theme: including Standard, Dark, and Light.
This new option is included in the Settings app and you are not mandated to
install GNOME tweaks before switching between the default themes.

2. Visual and performance developments


With the new release of Ubuntu 20.04, you are sure to expect an
improvement in performance and visual level. This simply means that the
display will be much clearer and the performance will be top-notch as
compared with the previous versions.

3. Deactivate all desktop notifications with the “Do Not


Disturb” option
If you are bothered by the numerous desktop notifications, the best thing you
can do is to disable all desktop notifications with the “Do Not Disturb”
option.

4. Fractional scaling
The new release of Ubuntu 20.04 introduces fractional scaling. If you have
been seeing that icons that are usually at 100% looked little and the ones at
200% looked big, this is the time when you can utilize fractional scaling to
the core.
If you activate the fractional scaling option, you can easily set the scaling
option to 150, 125, 175, and 200 (NB: While using this option, always recall
that it won’t work for several monitor setups).

5. Disable dock
In this new release, you are now at liberty to disable the dock. Asides from
disabling the dock, there is a new app, known as Extensions, which allows
you to manage and gain control of extensions, and through this, you can
easily disable or deactivate the dock feature.
6. Faster boot and install process
Because of the new compression algorithms, users can now install and boot
their Ubuntu 20.04 by using lesser time.

7. No Python 2 and Amazon app


Unlike former releases that included an Amazon app by default, the new
release failed to include Python 2 and an Amazon app. Individuals didn’t like
the inclusion of the Amazon app in the former versions because what it does
is to only open Amazon sites of your country (if at all you have one).
Other new features and releases include:

WireGuard VPN uniquely backported


No 32-bit systems
Enhanced or developed ZFS support
CHAPTER TEN

Linux security Tips


Although it may be fun to use a Linux system for one particular operation or
function or the other, but it is quite degrading when you begin to experience
security issues on your Linux.
Here, we have compiled some security tips you can incorporate to keep your
Linux system safe and secure.

1. Update the Operating System


After you have signed into your Linux system, refreshing and updating the
Operating System ought to be the primary move you make. Simply launch a
terminal and, contingent upon the kind of Linux you are running, run the
following command:

For red hat based systems:

For Debian based systems:

2. Activate the Firewall


On the off chance that you are running Ubuntu, the firewall is always
deactivated. Because of this, it is always best that you utilize the graphical
firewall interface “GUFW”, which is an acronym for “Graphical
Uncomplicated Firewall.”
After installing GUFW, simply pass the following command:
Once GUFW is successfully installed, you can proceed to launch it by
entering the below command:

Launch the GUFW and enable the firewall.


On Red Hat model 7, the firewall is always activated. On the off chance that
you are running an older version, you should commence the firewall on an
RH system by typing the below command:

In order to configure the firewall and confirm blocks, you can launch the
firewall by moving to System > Admin > Firewall from the type of panel at a
shell prompt:

3. Install Antivirus Software


This particular option is important because every system is prone to malware
and viruses. In order to keep away from any of them, you should endeavor to
install valid anti-virus software such as AV software, ClamAV and so much
more.

4. Third-Party Software
Third-party ought to be installed below the directory / opt. The third-party
software reduces your attack surface by removing unnecessary programs that
commence automatically.
The below command will list the entire running services. If you can spot the
services you are not using, simply decide to uninstall the apps that related to
that particular service:

The command helps see what processes are taking up a majority of the
system resources, but you should install and use “htop” by entering the
below command:

The command identified as “pstree” is another amazing way of seeing


processes, but it places them in a tree format.

5. Deactivate SSH Root Login


Deactivate SSH Root user access by launching the below file in your
preferred text editor:

Look for the below line:

Delete the pound sign from the start of the line:


Then terminate the file and restart the SSH service by entering the below
command:
6. Disable X Windows
If you are creating a Linux file server, there is no compelling reason to run X
Window desktops such as KDE or Gnome. You can simply raise the security
and performance of a server by deactivating X Windows.
The below command will deactivate X Windows by altering the run level
command:
Launch the file:

Locate the line that reads:

Alter the line to:

7. Deactivate CTRL – ALT – DELETE


If you are creating a production server, you should deactivate the CTRL-
ALT-DELETE option that begins the rebooting process.
While in your text editor, launch the below file:
Then find the line that reads:

Furthermore, comment on the line by prefixing it using a pound sign at the


beginning of the line:

8. BIOS Security
Type in your BIOS configuration and deactivate booting from USB,
CD/DVD, floppy, and external drives. Then activate the BIOS password and
settle on a strong password you can always remember.

9. Audit your System


There are numerous free tools you can use to audit your system. The most
recommended free too is Lynis, which is referred to as an open-source tool
that carries out a local security assessment and audits local services in case of
weaknesses. Lastly, the free tool is lightweight and straightforward to use.
Before using it, simply unzip it and run the below command:

Linux Network Administration


Linux system administration can be termed a task or job. It tends to be fun,
baffling, intellectually testing, monotonous, and regularly an extraordinary
wellspring of achievement. In other words, it’s a task like some others with
great days and with terrible days.
For new Linux admins, many enter the work from their inclinations as home
lovers or gamers. A Linux system administrator puts on numerous caps and
the smaller your surrounding is, the more caps you will wear.
Additionally, Linux administration encompasses new system builds,
hardware maintenance, file restores, backups, filesystem housekeeping,
automation, system security management, user maintenance. System admin
also encompasses every component of software and hardware management
for both virtual and physical
Strangely, you additionally need an expansive information base of
virtualization, interoperability, network configuration, and Windows OS. A
Linux system admin needs to have some specialized information on network
security, firewalls, data sets, and all parts of a functioning network.
The explanation is that, while you’re principally a Linux SA, you are
likewise important for a bigger support team that regularly should cooperate
to take care of complex issues. Security, in some structure or another, is
frequently at the foundation of issues standing up to a help group. Users
might not probably have appropriate access or a lot of access.
Finally, Linux system admins also have to be at the forefront of the best
practices, maintain patches, apply hardware updates, learn new software, and
read and adhere to security notifications.
How to know a file’s type
The file command decides on the type of file. Once the file type is derived, it
will send a message alongside the file type in a human readable format like
ASCII. Filenames in UNIX work on their own and they are useful commands
to know how to view or see a file.

Knowing a file’s type


To know the file type of a file, you simply have to send the name of the file
to the file command. Additionally, the file name together with the file type
will be printed to standard output.

To view or display the file type, simply send the –b option


The file command is helpful as filenames in UNIX and it does not relate to
their respective type of file (NB: This means a file referred to as
somefile.csv could mean a zip file).

Although the above could be confirmed by the file command as seen below:
CHAPTER ELEVEN

How to know the file type of several files


The file command can further work on several files and will send the result as
a different line to standard output for every file.

How to view the mine file type


To see the mime file type and not the human-readable format, simply hit the
–i option.

How to delete, copy, move, and rename files


When operating your Linux system, there are situations when you will
experience the need to copy, move, delete, and rename files. Meanwhile,
there are three important functions every OS distribution must be able to use.
Luckily, Linux offers numerous commands to carry out different tasks by
using the command line (NB: For your information, the command line is a
very strong utility because it gives users the power to carry out more
operations other than a graphical user interface can do).
Although these Linux commands are easy, it is important not to be misled
because you can carry out powerful and much more difficult moves, copy,
delete, rename commands with them.
How to use the Linux copy command to copy files
Linux offers users the cp command. The CP command allows you to quickly
copy files and directories in a snap.
Additionally, the CP goes through the below basic syntax:

The above Linux copy file command is simply copying the Source to Dest.
Linux Copy File and Directory Options
Additionally, the copy command in Linux provides for the addition of an
option when carrying out the command. The Linux copy file command is
easy and powerful.

Moving and Renaming Files in Linux


Linux provides users with an accessible utility for moving and renaming files
referred to as the mv command. The command is further referred to as the
Linux move command (NB: Asides from using the command to move a file,
it is also capable of renaming a file).
For instance, take a look at the file below:

The top command will easily move sample_data.txt to the data directory. If
the data directory is not there, the Linux system will form one and move the
sample_daata.txt.
Furthermore, if the sample_data.txt is already present in the data, it will
simply be overwritten.

Deleting files in Linux


Linux also provides users with rm for deleting files. You can check out the
Linux delete file command syntax below:
In the above command, the sample_data.txt file is deleted by the Linux delete
file command feature. Before we conclude this function, the Linux delete file
command offers extra options including –f force, -r recursive, -I interactive,
and –v verbose.
Users can also apply the commands and move them in more than a single file.
CHAPTER TWELVE
Environmental variables
When it comes to UNIX and Linux systems, environment variables are
identified as a set of dynamic named values, which are kept within the system
and are utilized by apps opened in subshells or shells (NB: In simple terms,
an environment variable is known as a variable that includes a name
alongside a linked or connected value).
What environment variables permit users to do is to customize or modify
how the system and the performance of the applications on the system. For
instance, the environment variable can keep or save data about the default
browser, the keyboard layout settings, or the text editor.

Shell Variables and Environment Variables


Variables in Linux contain the below format:

Here are some notable things to know about the above format:

You won’t find any space in and around the equals = symbol;
Whenever you give several values to the variable, you must
separate them by color :
The names of the variables are usually case-sensitive: This
means that the beginning of the values should have an upper
case.
So what are Environment variables: These types of variables are accessible
system-wide and are congenital by the entire spawned child shells and
processes.
Shell variables on the other hand apply to the present shell instance. This
means that each shell-like bash and zsh has its unique set of internal shell
variables.

List of commands and set environment variables in Linux

Set: This particular command either set or unset shell variables.


When set is utilized without an argument, its result is that it will
print a list of the entire variables and this includes shell
functions, shell variables, and environment.
Env: This command lets users run another program in a custom
environment without changing the present one (NB: When this
command is utilized without an argument, it will print a list of
the present environment variables in use).
Unset: This command terminates or deletes environment and
shell variables.
Export: In simple terms, the export command sets environment
variables.
Printenv: This command prints the entire or particular
environment variables.

Common Environment Variables


The below list contains the widely known environment variables:

EDITOR: This option represents the default file editor to be


utilized. Furthermore, this is also the editor that will be utilized
whenever you enter edit in your terminal.
USER: This represents the current user that is signed up.
HOME: This option represents the home directory of the present
user.
MAIL: This represents the location or the area where the present
user’s mail is kept or can be accessed.
TERM: This represents the present terminal emulation.
LANG: This presents the present locales settings.
PATH: This is a list of directories to be looked at when carrying
out or performing given commands (NB: When a user runs a
command, the system will look for the set of directories in the
right order and utilize the first one that can be executed).
SHELL: This is the path of the present user’s shell, like zsh or
bash.
LOGNAME: As the name implies, it represents the user’s
name.

Files and Directory Permissions


Linux is basically a multi-user Operating System that permits several users to
communicate and utilize similar Linux systems at the same time. In any
organization that has a network of Linux servers, there are usually multiple
important files and directories, and giving permissions like reading and
writing to the entire users may be a massive security risk.
Therefore, the administrator or the root user must be saddled with the
responsibility of altering the file permissions and permit only users or groups
of users to change the files. Primarily, 3 categories of Linux users can access
a file or directory and they include:

The user who created the file


Members of the group to which the file is located and more.
Whenever a user creates a file, the particular user is deemed as the rightful
owner of the file and also a group with a similar name as the owner is given
to the file. The rightful owner of the file can alter the default owner of the file
by utilizing the chown command in Linux.
Check below for an example that uses the ls-l command to state the
information that concerns a file:

In the above example, it is clear that there are a few parameters for every
shown file using the ls command. The initial one is the file type and if you
look closely at the example, you will find out that the – sign, which
represents a regular file.
Additionally, the character d represents that it is simply a directory.
Subsequently, you will find up to 9 characters that can assume different
values including read, write, execute, no permission, and so much more.
Going further, the 9 characters can be divided into 3 sets of characters each.
The first part of the 3 characters describes the file permissions for the file
owner, while the other 3 parts are meant for the group member, and the final
3 parts are for the rest of the members.
The chmod command works in two ways, one of which is to change the
permissions for the group members, owner, and the rest of the members.

1. Symbolic method
To fully comprehend the syntax for the symbolic method for describing the
chmod command, it is important to first of all, know the who, which, and
what (NB: This also means that the command needs to be specific to whom
we are ascribing the permissions to).
While the character g means group, the character u means user, and the
character a means all (NB: As a matter of fact, this particular list answers
the who question). To remove the permissions, you need to utilize the – sign.
In contrast, adding permissions requires you to utilize the + sign, and setting
permissions, utilize the = sign.

Take a look at the following command:

In the above example, the aim is to set the permissions while utilizing the
equal (=) sign. (NB: Also take note that doing so will, first of all, remove all
former permissions and give new permissions). In the same example, you
will also have to assign the three permissions to the owner, and only carry out
permission to other members and the group members.
Finally, another point to note is that the permissions are assigned in the right
order and not in a bad manner.
2. Numeric Method
The other method is referred to as the numeric method. In this case, you need
to describe the permissions as a three decimal number. Additionally, the
conversion rules are simply symbols, meaning you are mandated to have a
basic knowledge of binary numbers and how to convert them into decimal
values.
Some of the rules include:

0: (000): It means no permission is granted.


1: (001): It means it has only the execute permission.
2: (010): It means it has only the write permission.
3: (011): It has the inclusion of the write and execute
permissions.
4: (100): It includes only read permission.
5: (101): It assigns only read and execute permissions.
6: (110): The read and write permissions are assigned.
7: (111): Entire permissions.
From the above, the first character explains read permission, while the second
character explains write and the final one explains execute.

File and Directory – Real Ownership


Users can change the ownership of the files and directories while utilizing the
chmod command. View the syntax below if you choose to set the owner and
the group for the file or directory:

From the above, it is clear that both the owner and the group members have
already been changed.
CHAPTER THIRTEEN

Adding a User Group


A group in Linux refers to a unit whereby you can manage rights for
numerous users at the same time. In addition, Linux groups permit users to
manage several user permissions faster and easily.
Here are the recommended things to get before adding a User Group in
Linux:

Access to a terminal window


A user account with root or sudo privileges
A system that runs Linux

What does User Group in Linux mean?


In Linux, multiple users have different responsibilities which they are
expected to carry out. A few users may need the ability to carry out
applications, while other users may be limited and stopped from gaining
access to some folders and files.
Linux group further allows you to create categories of users with pre-set
permissions (NB: This means that rather than managing permissions for
every user account, you can easily add a user to a group to give the right
permissions).
Linux Groups is divided into Primary and Secondary Group.
Creating a user group in Linux can be completed by following the steps
below:

1. First of all, you need to type the following:

Then proceed to substitute new_group with the preferred name you


need for your new group.
Adding User to Group
If you choose to add a former user to an old group, you should enter the
following command:

Furthermore, utilize the user add command to add a user:

Alternatively, users can also utilize the usermod command to add a user to a
group:

The usermod command utilizes the –group and –append functions to attach
the user to a specific group (NB: If you fail to use the –append command,
the user will not be added to other groups).

Adding a User to Several Groups Simultaneously


Users are urged to utilize the usermod command to choose a particular group
or groups to add. It can be done by entering the following command:

Adding a User and Add to Group


This particular function is important for creating a new user for a particular
software app. Adding a user and add to a group can be accomplished by
typing the following command:

Subsequently, give a password to the new user by entering the following


command:
CHAPTER FOURTEEN

How to Delete a Created Group


If you do not want a particular group to exist any longer, you can always
choose to delete the group by using the following command:

Listing Groups in Linux


By default, Linux has multiple different groups. A few of these groups
including the sudo group are majorly used to grant permissions. Meanwhile,
for other groups, they are hidden and utilized for system tasks.
To check the list of groups on your system, enter the command:

To show the groups that a user is among, enter the following group
command:

List of Well Known Groups in Linux


There are multiple popular group names present in Linux and they are
outlined below:

Plugdev: It permits users to access external storage devices.


Sudo: A single member of the sudo group can utilize the sudo
command to raise or increase their capabilities.
Adm: This command permits users to watch their Linux system
logs.
Wheel: Although this command is old, but it still does the job of
granting sudo kind of privileges.
Ipadmin: It permits users to configure printers.
Cdrom: It permits users to mount the optical drive.

System Shutdown, Restart, and Logout Commands


If your Linux system is experiencing one issue or the other or if you simply
want your system to have a brief rest before using it again, you can take
advantage of these options including shutting down, restarting and logging
out.
To shut down your Linux system, you should enter the below command:

The above command will instantly shut down and restart your system (NB:
This particular command is mostly used in work).

Alternatively, the above command will shut down your Linux system after 1
minute.

Halt #
The above command will instantly bring your Linux system to a stop,
needing you to manually power off your system.

Poweroff #
The listed command will instantly stop your Linux system and also turn off
the system.

For Restart purposes, check out the following commands:


While the first command will reboot your system, the second command will
reboot your system immediately and the last command will shut down and
reboot your Linux system after one minute.

For Logout purposes, check the below commands:

Ctrl +d #: This command is mostly used in work.


Exit #: This command is also used in work.

Archives and Compressed File Commands


While carrying out duties as a system admin, you might have downloaded a
few archives that need the extraction to display the files. Also, you might be
backing up a whole database that consists of long and small files that you
want to add into one archive.
Compressing and archiving files are well-known functions in UNIX, and they
are usually carried out by system admins regularly. Thankfully, Linux shows
a set of different commands to compress, archive, extract, uncompress from
an archive.
Archiving files on Linux using tar
Tar is a well-known command among other system administrators. It was
first of all, used to write data to devices that failed to retrieve file systems.
Meanwhile, in recent times, the tar command is utilized to archive files (NB:
This simply means the act of arranging files together in one archive).
If you choose to archive files on Linux while utilizing tar, simply run “tar”
alongside the “cvf” options.
In this instance, there are three different options namely:

-v: This means verbose. This command shows the files added
to the archive when carrying out the function.
-c: This means to create an archive: This command is used
anytime you want to create a new archive designed from the
files chosen.
-f: This stands for file. This command is used to specify the
filename of the archive you want to create.
The above options are very vital for archiving files on Linux. Additionally,
when running the tar command alongside the “-f” flag, a new archive will be
formed in your present working directory.

The above option simply describes that the size of the archive is larger than
the sum of the files inside it. To compress files when archiving, you will have
to provide more options to the tar command.
Extracting files using tar on Linux
After creating an archive file, you might have to extract the files situated in
your archive. In order to extract files using the tar command simply attach the
“-x” option and not the first “-c” option.
Be aware that extracting your files will not mean that the archive will be
removed from your present working directory.

How to Compress Files Using gzip on Linux


Once your tar archive is complete, you will be prompted to compress it to
reduce its size. The first point of call is to utilize the gzip utility.
The gzip utility is meant to be installed by default (NB: In case that is not
already done, ensure you install it based on your distribution).
After installing gzip, simply run gzip and send the archive you created as an
argument.

Running the gzip command will form a tar.gz file in the present working
directory. Very crucially, the first tar file will be upgraded to a tar/gz so you
will not have the first archive.

From the above, the file size was reduced from 10 KB to 184 bytes, meaning
the file size was reduced by 98% and thereabout.
CONCLUSION
While Linux has been in existence for a very long time, it has been
overlooked by thousands of PC-based users for one reason or the other.
Meanwhile, over the past years, Linux operating system has come under
immense notice as it is currently competing with the likes of macOS and
Windows.
Installing a Linux operating system or distribution is not a challenging task
and it can be completed in a short period. The performances offered by Linux
systems are excellent and you need not worry about experiencing a slow and
frustrating line of operations.
Getting a Linux operating system is free and you do not have to break the
bank to begin enjoying its features. Although attempting to install a Linux OS
demands that you have one or two things in place like sufficient memory,
CPU and so much more, its requirements are not so demanding as the one
you will experience when installing either macOS or Windows on your PC.
Overall, we hope that this book has successfully answered all your questions
and inquiries about what Linux and UNIX are all about. If you are still unsure
about something regarding Linux, this guide is ever ready to refresh your
memory and bring you into the limelight about Linux, its features, and other
functions.

You might also like