Linux Learning

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 26

https://www.baeldung.

com/linux/linux-administration-series

Linux is a computer operating system free for development and


distribution, both commercially and non-commercially. There are times
when you may spend hours doing a repetitive task. A person who knows
command line can write a script in 10 minutes and if he has to repeat it,
can do it in a second. So what is Command Line and why is it so popular?
Command line applications provide us with numerous benefits which cannot
be achieved with any of the available GUI applications. One can create
scripts to automate work, and can go so much deeper into the system and
explore things that would generally be not possible with GUI.

Linux is the name we give to operating systems that are built around the
Linux kernel. There's no single Linux operating system, and operating
systems that are based on the Linux kernel are referred to as Linux
distributions.

Linux is based on the idea of free and open source software, software
whose source code we can view, edit, and change to suit our needs. The
Linux world is enormous, and Linux can be used for everything from
running huge global networks to controlling electronic projects like a
Raspberry Pi. Linux can be your everyday desktop environment at home or
at school, your software development platform at work, and it even runs
some of the world's largest and most powerful supercomputers. All of
these applications share the same basic components, a kernel, a user
space, files and resources, and so on. If that sounds complicated, don't
worry. We'll take a look at each of these ideas and components in more
detail later on, and I'll recommend courses for you to explore in order
to dive even deeper, if you're interested to do so. Linux runs in a wide
array of places, and that means that there are many different kinds of
people who have many different jobs or roles where they use Linux. For
example, I'm primarily a system administrator. My skillset in Linux
revolves around setting up, configuring, and maintaining Linux systems
that are intended to be used for specific purposes. Many people work with
the source code of the kernel directly as software developers or as
hardware developers, to enable the kernel to work with new hardware and
new technologies. Another large group of people who use Linux are
developers who work outside the kernel, to create software for
productivity, like office suites, image editors, chat apps, and more.
Many software developers use Linux for their coding and programming work.
And an enormous amount of the services we use on the web are hosted on
Linux servers. And many people use Linux to get other creative and
productive work done. These are writers, video editors, artists,
musicians, scientists, analysts, and all kinds of professionals,
hobbyists, and explorers, who may not care about the technical details of
the kernel or of software development, but who want to use free and open
source software and operating systems. Linux is for all of these people
because Linux is for everybody. Chances are you're here because you're
interested to learn about using Linux for one reason or another. You may
be an aspiring kernel developer, a system administrator coming to Linux
from another operating system, a software developer who needs to become
familiar with working in the Linux environment, or someone who wants to
build robots or home automation or self-driving cars. Or you may be
someone who wants to focus on using software tools on the desktop and not
worry about anything under the hood. In any case, the goal this course is
to give you an introduction to what Linux is and to provide you some
recommendations for extending your learning. There aren't many
prerequisites for this course, aside from having a general high-level
understanding of how to use a computer. If you have experience using
Windows or macOS, those skills can transfer over to a Linux environment
pretty easily. We won't be installing Linux in this course, so you don't
need to prepare your computer or set anything up. I'll be using an
installation of Linux to show you a few things, and I'll point out
resources along the way that will get you started installing and using
Linux when you've decided which path to take and where your first steps
will go.

Selecting transcript lines in this section will navigate to timestamp in


the video
- [Narrator] While it's common to think about Linux as an operating
system. It's more precise to understand Linux as the kernel of an
operating system. All operating systems have a kernel. Though we don't
often talk about them as much as we do with the Linux kernel. The Linux
kernel is an open source program which has been built and modified over
the years by thousands of contributors. It was first released by Linus
Torvalds in 1991. And it was created in response to restrictive licensing
that burdened other operating systems at the time. The license that
applies to the Linux kernel allows it to be used and distributed freely.
And this has resulted in the Linux kernel being made available in a large
variety of Linux distributions, which we'll talk about later on. A kernel
is software that communicates with the computer's hardware in order to
give programs and therefore users access to these resources so they can
do what they need to do. A kernel can run on its own, though it's not
very useful without programs communicating with it. And we can't run
programs without a kernel taking requests and information and translating
them to the systems hardware. The kernel is what allows us to use a
computer but it's only part of a working operating system. We can think
about this using three levels. First there's the hardware, the memory,
the CPU, the storage, the network card, and so on. The kernel
communicates with this hardware and presents a series of system calls or
syscalls to programs running in what we call user land or user space. A
metaphorical area outside of kernel space where the software running on
the system operates. Imagine the action of saving a file in a text
editor. When I click save, the text editor software uses a user space
library to tell the kernel what to save and where to save it. The kernel
then communicates this information to the storage medium and reports back
that the operation succeeded. Modern Linux kernels are able to
communicate with a huge variety of computer hardware and they can provide
an ever-increasing number of useful functions for programs to use. The
Linux kernel can run on tiny devices like circuit boards intended for
hobby use, on super computers, solving the mysteries of the universe on
desktops, on laptops, on mobile devices. and even in cars. Usually, these
applications will employ a customized kernel which has been slightly
modified to run on different kinds of processors or which have support
for unnecessary hardware removed. But they're still all the Linux kernel.
Thinking about the kernel can seem pretty technical and intimidating.
Though we don't need to worry about it, if we're just getting started
with Linux or if we're going to be using Linux in a way that doesn't
involve working directly with the kernel. For most users, the kernel just
sits in the background taking care of what needs to get done. Some Linux
users though, especially hardware designers and some types of programmers
and system administrators will interact with the kernel directly. In some
cases, people working with the kernel will need to edit the source code
of the kernel, to add new features or make changes to how it works. And
as I mentioned before, that's something that's encouraged. The Linux
kernel is open source, and anyone can download, edit and run the code
that makes the Linux system work. If you're so inclined, you can download
the source code of the kernel at kernel.org. The kernel is what makes
Linux, Linux. But in order to have a working system where we can get work
done, we need software that interacts with the kernel. And we need some
other supporting configurations to get a system up and running. When a
Linux system starts up or boots, it goes through a process where the
kernel is loaded and then software called an Initialization System or
System Manager, takes over and starts up programs to get the system to a
state where we can interact with it. This Initialization System starts up
services like networking, storage, sometimes a desktop environment, and
things like that. Again, many Linux users won't need to concern
themselves with this. But system administrators and hobbyists who like to
tweak the knobs and dials on things, might find themselves diving deeper
into this process. Even if you plan to use a Linux system without
concerning yourself with all the under the hood stuff, it's helpful to
know a little bit about the Linux kernel, and what its role is. And if
you plan to get into the technical details and make changes yourself,
Linux is one of the few operating systems that makes that possible.

Selecting transcript lines in this section will navigate to timestamp in


the video
- [Instructor] There's two primary ways of using or interacting with a
system that runs Linux. These are through a desktop environment and
through a text-based shell. Let's take a look at both. When we use an
operating system like Windows or macOS we'll often use a graphical
desktop environment in order to run software, interact with files and do
what we need to get done. On Linux, we have a variety of desktop
environments to choose from, Ranging from very simple and straightforward
environments to environments with the rich sets of features. These
desktop environments feature the kinds of windows and icons many of us
are used to, along with menus and other visual enhancements. We can
install and switch between desktop environments to discover which one we
like best. Most Linux distributions as we'll see in a little bit, make a
choice for us as to which desktop environment they use out of the box.
But one of the primary appeals of Linux for many people is that pretty
much anything can be customized. Some popular desktop environments are
the GNOME Shell, KDE Plasma Desktop, LXQt, Cinnamon, MATE and Xfce. There
are others out there but these are the ones you'll find to be the most
widespread. Again, more on that when we get to talking about distros.
While many people use Linux with a desktop environment in order to do
their work, some tasks need to be accomplished in a different way. And
that brings us to the other primary method of interacting with the Linux
system, the console. The console is a text-based interface where an
interactive shell runs. Where we type commands for the shell to run and
the shell displays any returned information to us also in text form. The
terminology around this can be a little confusing, but it's important.
The shell is the software we interact with using text commands and text
outputs. There are a number of different shells out there with Bash being
the most common. Other shells like Zshell, Cshell, fish, Kornshell and
more can be found in different distros and they can all be installed on
your system if you'd like to explore them. Over time people often develop
a preference for one over another. Though, being familiar with Bash will
help you out on most Linux systems. A shell will often run inside of a
terminal application in a graphical environment. And if the system is not
running a graphical user interface and only has the text interface
available, that's considered a console. It's also important to know that
there are terminal emulators which run on windows and macOS that you can
use to connect to a remote Linux machine. If it's running software like
SSH or secure shell that provides remote access. This lets us run that
remote shell within a local terminal window. So if you plan to explore
Linux using the text-based interface, you don't necessarily need to
install Linux on your primary machine just to connect to an installation
of Linux on a hobby system or home server. A Mac or a Windows system can
connect just fine to a Linux system. We're not going to focus too heavily
on the details of using shells here, but if you're interested in learning
more about a command line shell, take a look at the resources I'll
recommend later in the course. Familiarity with a command line
environment will be helpful if you plan to work with Linux systems
remotely, connecting to a machine that you're not sitting in front of in
order to control what it does and how it works. And it's useful, even if
you're working locally. What you intend to do with Linux will influence
whether you spend more time in a desktop environment or more time in a
terminal environment. Many people mix and match these two ways of
working, relying on the strengths of each interface type for different
tasks. Take some time as we go through the course to think about what
tasks you need to do or want to do on a Linux system. If it's browsing
the web, editing photos, watching videos, composing music or documents
and things like that you'll need a desktop environment. And you might not
even need to think about terminal or command line stuff if you plan to
use a Linux system this way. If you plan on connecting to a hobby board
like a Raspberry Pi, a home server or a web server at a cloud host
that'll be something you can do in a terminal from whatever system you're
already using. Or you might attach a display directly to a system and run
Linux in console mode rather than using a desktop environment. It can be
intimidating if you're just getting started to face an unfamiliar system
with an unfamiliar interface

Hardware running only a Linux kernel, isn't very useful to most people,
so we'll need to use software that lets us use the computer for doing
whatever we need to do. Linux distributions come with a set of tools that
let users and software interact with the system. And these tools often
include a software package called the GNU coreutils, short for core
utilities. Many of these coreutils are commands that we'll commonly use
when working in a shell. Including commands to copy and move files, to
change permissions and security contexts, to view some status information
and so on. Humans use these, the command line, and scripts and other
programs can use them as well, to perform basic tasks. We can add other
software later, but out of the box so to speak, a basic Linux
installation will have these standard tools available. Which give us a
minimal operating set of utilities, and which are needed in order to
customize the system, use it to get work done, and even to install and
manage other software. This slide shows the coreutils that are part of
the Ubuntu desktop installation. You don't need to write them down or
anything like that, I just wanted to give you a look at how many there
are. I've highlighted some commonly used commands, like cat, which we use
to display file contents, cp, which is for copying files, df and du,
which show information about how much space is used up on the file
system, and more. My course, Learning Linux Command Line, covers some of
these common commands, the ones that are useful every day and which a
command line user should work to memorize. The coreutils also include
commands that many people will use less frequently, if ever. Some of them
are legacy commands that are expected to be available for historical
reasons. And some are for very specific tasks that most Linux users, and
certainly most Linux learners, won't need to use. I've been using Linux
for almost 20 years, and I've never used some of these. Generally
speaking, if you have a Linux distribution installed, you don't need to
worry about installing these tools yourself. They're just there in the
box alongside the kernel and other supporting software, that distribution
maintainers built in for us. And if you're going to be using desktop
environment, and not a shell in a terminal or console, you don't need to
worry about these at all. Well, most distros use the GNU coreutils, some
use a different set of tools called BusyBox. It's an alternative to GNU
coreutils and it's often found in small, or embedded systems. What makes
BusyBox interesting is that it's a single program, which offers many of
the functions of common coreutils tools. It also offers a wide array of
other tools as well. This shows the commands that BusyBox offers, and
again, I don't intend for you to write them down, or even remember them.
The point is to show how much supporting software we get from this one
package. Here, I've highlighted the BusyBox commands, which overlap with
the coreutils. The others are implementations of other common tools or
are features offered by shells and things like that. The point here is
that while the Linux kernel itself can interact with a huge amount of
hardware, and provides an enormous amount of functions that software can
hook into, much of what makes Linux a flexible, consistent and widespread
operating system, is the tools that accompany the kernel in a
distribution. Whether you're using a system with GNU coreutils, or
BusyBox, you can rely on having common, basic, familiar command line
tools at your disposal. When you reach for the command to copy a file
from one place to another for example, it's the same on all Linux
systems. It works pretty much the same, and it has the same name. This
common foundation of software makes it easier to switch between distros.
Because these commands are available nearly everywhere within the Linux
world.

Software and packages


Selecting transcript lines in this section will navigate to timestamp in
the video
- [Narrator] In addition to the core utilities that come with nearly all
Linux distributions, we'll usually want to run other software on our
system as well, like games or productivity tools or anything really.
Depending on what we want to run on the distribution and in many cases on
our own preferences. There are many ways of getting software onto a Linux
system. The most common method is to use the distributions software
repositories, which are libraries of software maintained by the
distribution maintainers that contain software packages designed for use
on that distribution. Using command line tools or graphical tools, we can
search these large libraries of software. We can indicate what we want to
install and the package management software handles downloading and
installing that software and any other necessary software it might
require in order to run. These repositories are also where important
software updates like security fixes come from, and many distributions
have an automated task that checks for those and can install them
automatically. The software that's stored in repositories usually takes
the form of packages, and there are a few different types of package. We
won't go into the details here, but different distribution maintainers
will generally choose to base their distribution on one or another kind
of package and package management software. The choice of package
management software is an important part of the decisions that go into
defining and distribution. In general though, all the different kinds of
packages and package managers operate in broadly the same way. They take
a software package and copy its contents into the places on your system
where they belong. The executable or the program that runs is put into a
specific place where the system can find it. Libraries that the software
needs are put in their appropriate location. Documentation is added to
the documentation viewer or man pages and so on. The software in these
packages is built or compiled from source code, and we can also use
source code to build software to use on our system if we want to. To do
that, we'd need to create or download source code, and we'll also need
software development tools like a compiler that can take that source code
and use it to create binaries or executable programs that the computer
can run. Once we compile software, we'll be able to run it and we can
store it wherever is appropriate on our system. While compiling simple
programs from source is fairly straightforward, very complex software
often requires the use of make files. These provide the system with
instructions about how software should be built, what to do with the
binaries and other files after it's built and so on. This path isn't
terribly common for new Linux users, but it is an important part of the
open source ecosystem, so it's useful to know about. There's also another
method of installing and running software on Linux systems, and that is
to use platform independent packages. There are a number of different
implementations of this idea, most notably Snaps, Flatpak and AppImage.
These are each different methods of running an app from its own isolated
little package rather than installing executables or binaries directly in
our file system. These packages can be found on and installed from
repositories of Snaps or Flatpaks or AppImages using command line or
graphical tools similar to those we use for distribution repository
packages. While these kind of platform independent packages are quite
modular and can be easier to use in some ways. they can also have some
drawbacks like speed and interoperability with the overall file system.
If that all sounds a little confusing, don't worry, it actually kind of
is. Different software is often distributed in different ways, so it's
quite possible that you might need to use a Snap for one program, source
code for another and the systems package manager for something else.
However, simply knowing that there are these different ways of installing
software should help to clear up some confusion and prepare you to get
and use the software you need.

The Linux file system


Selecting transcript lines in this section will navigate to timestamp in
the video
- [Instructor] To store data on a Linux system, we use files, and files
are organized into directories or folders as they are on other operating
systems. These files and directories make up the file system. In order to
organize files consistently on Linux systems, most distributions follow
the Filesystem Hierarchy Standard, or FHS. This standard makes it
possible for us to switch between distributions easily and to use
unfamiliar distributions without having to spend a lot of time looking in
different places on different systems for files we need. Though if you're
coming to Linux from another operating system, it can take awhile to get
used to how files are organized. In the Linux file system, everything
starts with the file system root, which is represented by a single slash.
On a Linux system, there's only one file system root. Even if we plug in
other storage devices, those become part of the overall file system and
aren't represented as separate file systems, like we might be used to
seeing on a Windows system with a C and D and other drives. You can think
of the file system root kind of like the My Computer level on a Windows
system rather than the C drive. Using a desktop based file browser, we'll
see other disks listed as we might expect on other operating systems.
Even though they're mounted or made available within the root file
system, usually under the mnt directory or inside of a directory called
media. From the root, we move deeper into the file system, and at the
first level, there are a variety of directories each with a specific
purpose. Some of the important directories defined by the FHS include the
home directory where each user's personal files are stored, and bin,
sbin, and usr where programs have different types are kept. Again,
there's also mnt or media, which are used for mounting or attaching other
file systems, like you'd find on network shares and other disks. And how
those are used will vary based on which distribution you're using. The
etc directory is where system wide configuration files are stored. And
var is where changeable or variable system information is kept. This is
where we'll find system logs and logs for other software. Some
directories defined by the Filesystem Hierarchy Standard aren't real
directories at all. The dev, proc, and sys directories are created by the
kernel to represent hardware available on the system, including all the
systems hardware, processes that run programs, settings in the kernel,
and so on. When we're getting started with Linux, we don't need to worry
too much about these directories. It's good to know what they are though,
because as I mentioned, it can be overwhelming to see all this if you're
new to Linux. While the layout of the files and directories is called the
file system, the term file system is also used to refer to different
strategies or data structures for storing and representing file data and
file metadata. Those are things like ext4, btrfs, ZFS, XFS, and so on,
but we're not going to get into different file systems here because in
most cases you'll choose one or another based on what you need your
storage system to do, and that's something that's a bit more advanced
than I want to go into here. For most users, it's not something we'll
have to think about too much, but some administrators and developers make
their entire career about working with and administering file systems and
storage. When we're getting started with Linux, it's fine to just let the
OS installer handle choosing what type of file system we'll be using. We
can always create other file systems on other media later on. The file
system on a Linux machine can seem intimidating and technical and even a
little bit alien if you're used to other operating systems hiding some of
the inner workings from you. But knowing where to find our own files and
having an idea of what the other directories are for, provides a good
start for working with Linux.

The Linux file system


Selecting transcript lines in this section will navigate to timestamp in
the video
- [Instructor] To store data on a Linux system, we use files, and files
are organized into directories or folders as they are on other operating
systems. These files and directories make up the file system. In order to
organize files consistently on Linux systems, most distributions follow
the Filesystem Hierarchy Standard, or FHS. This standard makes it
possible for us to switch between distributions easily and to use
unfamiliar distributions without having to spend a lot of time looking in
different places on different systems for files we need. Though if you're
coming to Linux from another operating system, it can take awhile to get
used to how files are organized. In the Linux file system, everything
starts with the file system root, which is represented by a single slash.
On a Linux system, there's only one file system root. Even if we plug in
other storage devices, those become part of the overall file system and
aren't represented as separate file systems, like we might be used to
seeing on a Windows system with a C and D and other drives. You can think
of the file system root kind of like the My Computer level on a Windows
system rather than the C drive. Using a desktop based file browser, we'll
see other disks listed as we might expect on other operating systems.
Even though they're mounted or made available within the root file
system, usually under the mnt directory or inside of a directory called
media. From the root, we move deeper into the file system, and at the
first level, there are a variety of directories each with a specific
purpose. Some of the important directories defined by the FHS include the
home directory where each user's personal files are stored, and bin,
sbin, and usr where programs have different types are kept. Again,
there's also mnt or media, which are used for mounting or attaching other
file systems, like you'd find on network shares and other disks. And how
those are used will vary based on which distribution you're using. The
etc directory is where system wide configuration files are stored. And
var is where changeable or variable system information is kept. This is
where we'll find system logs and logs for other software. Some
directories defined by the Filesystem Hierarchy Standard aren't real
directories at all. The dev, proc, and sys directories are created by the
kernel to represent hardware available on the system, including all the
systems hardware, processes that run programs, settings in the kernel,
and so on. When we're getting started with Linux, we don't need to worry
too much about these directories. It's good to know what they are though,
because as I mentioned, it can be overwhelming to see all this if you're
new to Linux. While the layout of the files and directories is called the
file system, the term file system is also used to refer to different
strategies or data structures for storing and representing file data and
file metadata. Those are things like ext4, btrfs, ZFS, XFS, and so on,
but we're not going to get into different file systems here because in
most cases you'll choose one or another based on what you need your
storage system to do, and that's something that's a bit more advanced
than I want to go into here. For most users, it's not something we'll
have to think about too much, but some administrators and developers make
their entire career about working with and administering file systems and
storage. When we're getting started with Linux, it's fine to just let the
OS installer handle choosing what type of file system we'll be using. We
can always create other file systems on other media later on. The file
system on a Linux machine can seem intimidating and technical and even a
little bit alien if you're used to other operating systems hiding some of
the inner workings from you. But knowing where to find our own files and
having an idea of what the other directories are for, provides a good
start for working with Linux.

User and system security


Selecting transcript lines in this section will navigate to timestamp in
the video
- [Instructor] Multi-user operating systems are normal these days. Linux,
Windows, and macOS are all multi-user, though it originally wasn't the
case that computers could support more than one user. There used to be
just the user, and they could do whatever they wanted on the system.
While that's convenient, at least for that one user, it's not very
efficient, and it's a security nightmare. So like other modern operating
systems, Linux uses a multi-user model where each human using the system
can have their own user account with separate files and settings. And the
same is true for software and services. Some programs and services,
especially things like a web server, a database server, and other
software that isn't tied to a particular human user often run using their
own user account. Usually, these accounts, human and computer, are
standard accounts. That is, they can work with their own files, but they
aren't allowed to make changes to the system or to files outside of their
own space. On Linux systems, there's also a superuser or administrator
account called root, which has the ability, or the privilege as it's
known in the security model, to access any file on the system and to
change settings on a system wide basis. We can use the root account
directly, or we can borrow its privileges if the account we're using is
empowered to do so using the su command for substitute user or sudo,
which we can use to run a particular command using superuser privileges
to do a particular task while substituting the root user for our own.
We'll do this if we need to install software, or if we need to change
network settings or things like that that affect the whole system. For
safety and security reasons though, we'll rarely if ever actively use the
computer under the root account. Not only is it a bad idea, it can cause
problems that are tricky to resolve. Root can be thought of as a powerful
and special tool that's best kept in safe place, which we only get out
when we need it. Linux also maintains single-user mode for
troubleshooting and other activities where the only user is the root
user, but for the most part any Linux system we use will be running in
multi-user mode during normal operation. Within containers and on
embedded systems though, we'll sometimes still see a single-user model
too. There's a similar division between an unprivileged or standard user
and a privileged or administrative user on Windows and macOS as well. So
it's not that different on Linux if you're used to administering another
operating system. The key to this difference between users is
permissions, which are a way to represent which user has which rights to
do which things to which files. Permissions let us indicate whether a
user, members of a particular group, or anyone at all can read from a
given file, write data to it, or execute or run it. Permissions are often
represented either as numbers or as letters, and in each case, they're
made up of three sections, one for the user, one for the group, and one
representing all others. Each section represents the restrictions applied
to the file for that audience. As with many things on a Linux system,
permissions can look pretty confusing and technical, but once you know
what they mean, they make more sense. When you're getting started with
Linux, you may run across times when you need to work with permissions or
find occasions when you'll need to use the superuser account to make a
change to the system. A desktop environment can make working with
permissions a little bit easier, and to make changes at the command line,
we'll use the chmod command and sometimes chown and chgrp. These are
covered in more depth in some of our system administration courses here
at LinkedIn Learning. Another security aspect that I want to mention just
briefly here are security packages like SELinux and AppArmor, which can
provide very detailed security constraints and controls that applied to
programs and users alike. Security is an important part of Linux, and
it's a very deep field to get acquainted with. When we're starting out
with Linux, we'll only brush up against security management issues now
and then, if at all. As with the details of the file system and the
technical aspects of the kernel, at this point it's only important to
know that there's a multi-user security system we're working within on a
Linux system, and that it's an area that can be further explored should
that be necessary for the work you need to do.

Choosing a Linux distribution


Selecting transcript lines in this section will navigate to timestamp in
the video
- [Instructor] We've spent some time looking at a few major components
that determine how a Linux system operates, and now, it's time to take a
moment to understand what Linux distributions are. Distributions or
distros are kind of like different flavors of a Linux operating system.
Take ice cream for example. There are all kinds of different flavors out
there, but all flavors share one very important thing in common. They're
all ice cream. Some have nuts, some have gooey chocolate fudge and some
have a sweet fruit topping. We can think of Linux distributions like this
too. While distributions differ in important ways, they all share the
fact that they include a Linux kernel. As with our ice cream example,
they also have differences that make them unique. Distributions differ
from each other in the tools they package together and the series of
decisions made by the distro maintainers about how the operating system
will operate. Different distributions also come with different
repositories or collections of software that are available to install.
Distributions also differ in how they're supported, such as by the
community or by a commercial organization and for how long support is
offered. Some are supported for only a few months and others enjoy long-
term support or LTS that can last for years. All Linux distributions come
with a kernel, though the specific version and features of that kernel
often vary based on what a particular distro is intended to do. Very few
distros come with what's called the upstream kernel, the official kernel
maintained by the Linux Foundation. Most have tweaks here and there to
enable or disable certain features and customizations. Some distributions
use a very updated version of the kernel and provide lots of additional
software to develop the kernel and drivers and those distributions are
favored by developers and enthusiasts. Fedora is an example of this. Some
distros ship with older kernels, which can provide stability for systems
that need to run for a long time without changes, like servers and other
production infrastructure. In these scenarios, we don't want to have new
features added when we run software updates or risk features we use being
removed or deprecated. An example of this is CentOS. Some distributions
are intended to run in embedded devices where they don't need to support
any hardware other than the specific gear they're running on. The
operating systems available for the Raspberry Pi, like Fedora and
Raspbian are examples of this, and many Distros strike a balance
somewhere in the middle, with a fairly recent kernel version and a large
amount of drivers for common hardware, and that's pretty common for
distributions that are widely used on the desktop or are intended to be
quite user friendly. Ubuntu desktop, Linux Mint, openSUSE and other
distros targeted at general desktop use are examples of this. Linux
distros also come with core tools like we saw earlier and most come with
additional software, which, again, will vary based on what a given distro
is for. Some distros intended for servers come with just a minimal set of
management tools and others intended for desktop use come with a wide
array of productivity software, creative software in the desktop
environment, all pre-installed and pre-configured. Other choices that
define distros are which package management solution they use, which
system management or init system they use and how hardware is managed and
configured. Ubuntu distribution, for example, uses a system called
Netplan to configure the network, while Fedora and Red Hat use
NetworkManager instead. Debian, Ubuntu and a variety of other distros use
the APT package manager while Fedora and Red Hat use dnf. Alpine Linux
uses apk and openSUSE uses zypper. Most of the widely popular distros use
systemd as the system manager, but not all do. While these are some high-
level differences we can use to differentiate distros, distros also offer
from each other in small ways. Debian, for instance, doesn't come with
sudo, a command we can use to act as the super user. The choice made by
the Debian maintainers is that users should actively switch to the super
user account when we need to administer the system and switch back when
we're done. Most distros, though, include the sudo or sudo command, which
makes using super user privileges easier and we can install that command
on Debian if we want to. A software package can have different names and
configurations across distros too. The Apache HTTP Server, for example,
is called Apache2 on Ubuntu and httpd on Fedora. These differences
between distros can be distracting and frustrating for new Linux users,
especially when you find a tutorial that you want to follow or an answer
to a question you have. If someone wrote the tutorial or answer assuming
someone is running Ubuntu and you're running openSUSE, for example, many
of the steps will be different. So it's important to know at least that
there are differences between distros and it's important to know which
distro you're using, especially when you're following a tutorial or
looking for help. If you don't know what you're running, you can usually
find out in your desktop's About screen or from the command line with the
command, cat/etc/*release. Here, for example, you can see I have two
shell sessions, one connected to a system running Ubuntu 18.04.5, and one
connected to a system running CentOS 7.8.2003. As you experiment with
different distros, you'll gain more of an understanding of where things
are the same and where they're different. Linux distributions are
maintained by different companies, organizations, and groups of people,
each with a focus on specific sets of tools or specific uses. In many
cases, servers will run Red Hat Enterprise Linux, Debian Server or Ubuntu
Server and might run Fedora, Ubuntu desktop, Linux Mint, or Arch Linux.
Project boards like Raspberry Pi might run Raspbian and Fedora and many
containers and embedded systems run Alpine Linux. These distros are all
just different sets of tools including core utilities running on top of
the Linux kernel. Many distros share a relationship to other distros. For
example, Red Hat Enterprise Linux is related to Fedora, so most of the
tools and configurations you'd use to work in one would be the same in
the other. Ubuntu, Mint and many other distros are based on Debian. So
again, using one of those will feel quite similar to using another. Along
with Slackware, which is the predecessor to SUSE Linux, Red Hat and
Debian round out the largest families of distros. I encourage you to take
some time to explore the Wikipedia entry entitled List Of Linux
Distributions, both to get a sense of the variety of distributions
currently and historically available, and also to see their timeline of
distro development, here on the right. It shows how legacy distros
influenced later ones and it's fascinating and very tall. But with so
many options available, it can be challenging to feel like you're picking
the right distro to start out with. Many people have strong opinions
about what distro others should use and how they should get started. Some
enthusiasts recommend an all-in approach like starting out with Arch
Linux because it's quite minimal, and all of the decisions around what
software should be installed, including what software the system uses to
boot up needs to be configured by hand before the system can be used,
Other enthusiasts maintain that the one true way to learn Linux is to
first start by compiling your own kernel. These approaches may be
appealing to some people, but I think they're a little bit too much to
ask for someone just getting started with Linux. But if either of those
sound like fun, by all means, start there. If you just want to get up and
running quickly, I'd like to give you a more practical suggestion. Start
with Ubuntu. It's widely used, which means it has a lot of attention on
it in terms of bug fixing and modern software, and it has a broad
community of users at all levels, meaning that if you have a question
about it, chances are someone else has already asked and answered it. The
desktop version provides a desktop environment to explore, as well as
having a terminal you can use to work at the command line. It comes with
a whole bunch of productivity software too, Though, of course, if you're
learning Linux with a goal of using a different distro, you should start
out with that distro instead. If your company uses Red Hat Enterprise
Linux, you should start with that or with Fedora, if you don't have a Red
Hat license. If your company or organization uses SUSE Enterprise Linux,
check out openSUSE, the free option in the SUSE ecosystem. Especially
when you're getting started, picking a distro is a pretty low stakes
choice. You can always back up your files and move to a different one
later. So as I said, if you need to learn a specific distro, start with
that. If not, try out Ubuntu. If you hate it, try something else. If you
like it, try something else too. Nearly all popular distros will have
what you need to follow basic tutorials. Though, keep in mind that most
tutorials are centered around Debian or Ubuntu or the Red Hat family of
distros because they're so widely used. Only as you start to specialize
in a few fields will it really become important what specific distro you
use, and if you plan to be a system administrator or work in that area,
knowledge of more than one distro will be very helpful. The variety of
distros and the anxiety of choosing one can be a big hurdle for people
learning Linux, and if that's something that's giving you stress, just
pick one and go with it. As I said, I recommend Ubuntu as a starting
point, but if you know you have different needs, use something else
instead.

Planning your system


Selecting transcript lines in this section will navigate to timestamp in
the video
- [Instructor] As you move forward and start to work with Linux on your
own or as you follow instructional materials, you'll need to make a few
decisions that will guide the setup of your Linux environment. You'll
need to decide what you want to accomplish with your Linux system. And
once you know the answer to that, you'll need to use that information to
decide which distro you'll use and where the Linux installation will run.
It's a good idea to think about your choice in terms of whether you'll
need or want a desktop environment or whether you just need command line
access, either in a console or through a remote shell. If you need a
desktop environment, as I mentioned before, I'd recommend starting out
with Ubuntu Desktop Linux and seeing if that fits your needs. Other good
choices for distribution to try first are Debian Desktop, Fedora Desktop,
and Linux Mint. That is of course unless you already know what distro you
need to work with or want to work with. If your team or organization uses
something else, that's what you should start with. If you need a Linux
system that doesn't have a desktop environment, for example, if you're
learning how to use the shell or you're administering a system that isn't
going to be used with the GUI, you can use any of these. But you might
also consider a lighter weight distribution, which comes with a more
minimal set of tools as we often find in the server versions of various
distros, like Ubuntu Server and Debian Server and in their minimal
versions as well. And if you're feeling adventurous you could explore
starting out with other distros like Arch or Alpine. Again, we face a
choice when it comes to how the system will run. Usually, we'll run a
distro that uses a desktop environment either in a virtual machine, as a
native install, or sometimes from a live boot environment that's part of
the installation disk. Virtual machines provide the ability to run an
operating system in a protected space on your computer, separate from
your primary operating system. In a VM, we can install Linux and use it
like it's a real computer but without affecting anything on the host
system. The whole Linux system lives as a series of files on the host
computer and can be copied to other systems too, should that become
necessary. There are a few software tools that let us run virtual
machines. VirtualBox is a free option for Windows and macOS systems, and
Hyper-V is a free option on most versions of Windows. There are also
commercial products that offer other features, including VMware
Workstation for Windows, VMware Fusion for macOS, and Parallels Desktop
for macOS. If you plan to use a virtual machine I recommend you take a
look at VirtualBox because it's free and works on all major operating
systems. We have courses here on LinkedIn Learning that cover these
tools. If you have a spare computer you can install Linux directly on
that instead, replacing whatever information and operating system were on
it before. A machine that's dedicated to running Linux doesn't need to be
all that modern or powerful unless you're planning to use it to do work
that requires high performance, like video editing, audio work, photo
manipulation or anything that's heavy on calculation. Using a native or
bare metal install on real hardware gives you the full performance of a
system, though it does have the drawback of being less portable than a
virtual machine. If you have a home lab, a native installation might be
what you want. But if you need your Linux environment to go with you to
the office, to school or to some other place, a virtual machine might be
a better choice. We can mix and match though, too. I have a home server
that runs Linux and never leaves my house. And I also use virtual
machines to try out new things and practice my skills. You could also use
a hobby board like Raspberry Pi to run Linux as a native install that's
reasonably portable. This is a good choice if you want to explore using
hardware that the Pi is able to communicate with. If that's a match for
what you want to do, check out Raspberry Pi Essential Training. And there
are small computers like the Intel NUC, which are powerful, but have a
tiny footprint if you're at a premium for space. I mentioned another
option for running a desktop distribution too. And that's live boot. A
live boot environment, which is available when you boot up most
installers for desktop distributions, will give you an opportunity to
work with the distro without installing. It's a bit slow, but there's no
setup required, and that can be useful sometimes. Most live boot
environments won't save any files you create though. So if you write code
or create documents, you'll need to use a web browser to store those on
cloud storage or use some other method like an additional external disk
to store your work. Here at LinkedIn Learning, we have courses that can
help you get started with the desktop version of Linux, including
Learning Ubuntu Desktop Linux, Learning Fedora Linux, Learning CentOS
Linux, and if you're interested in security research, Learning Kali
Linux. They'll all walk you through installing a distribution and show
you around the basics of using that distribution and its default desktop.
If you're interested in setting up Ubuntu Server, which starts out with
just the command line interface, check out Learning Ubuntu Server here on
LinkedIn learning. To run a Linux environment without a desktop, which is
a common way of using a Linux system, we have a few other options.
Virtual machines and native installations are popular for this. But we
can also use a cloud service to host a machine we can connect to
remotely. We can do this with a hosting service like Microsoft Azure,
Amazon Web Services, Google Cloud, Linode, DigitalOcean or other
providers. While some of these have a free offering, others have a cost
associated with them. Using a cloud server is a useful option if you need
an environment you can access from various places, or if you don't have a
computer that can handle running a virtual machine. The drawback of a
cloud service is that it can be a little bit more technically demanding
to get started. The actual creation of the machine is very easy. The
machines are built almost instantly from predefined templates. But most
cloud providers will require some work to get user access set up, and
you'll need to learn a little bit about remote access through SSH. If
you're already familiar with this, great! If not, look for support on a
cloud provider site to tell you what you need to do in order to access a
remote server. To explore this further, take a look at Learning SSH.
Another option, if you have a Windows 10 computer, is to use Windows
Subsystem for Linux and install one of the distros available for that
environment. The WSL environment is generally targeted at developers who
need a Linux system they can use through the command line. And to learn
more about that, check out Learning Windows Subsystem for Linux here at
LinkedIn Learning. Hopefully at this point you have a sense of where you
want to start. Do you have an idea of what distro to start out with based
on what your goals are? Have you decided whether to use a virtual machine
or a cloud server, a project board or a physical machine? And have you
identified a few steps beyond the initial install for moving toward your
goal? If so, you're ready to move forward and set up your environment. I
won't cover that here because there's a lot of different options, but I
encourage you to pause here, if you're so inclined, and go set up a Linux
environment. Or just sit back and keep watching and set up your
environment whenever you're ready.

How to find your distro and version


cat /etc/*release

Shell and Terminal

Shell - simply put the shell is a program that takes command from the
keyboard and gives them to the operating system to perform. It's good to
be familiar with the shell, regardless of what you plan to use a Linux
system for.

Terminal - It is a tool which you can use to pass your shell commands.
This is a program that opens a window and lets you interact with the
shell .

We are using Virtual Box and Ubuntu16.04 on our computer.

Open terminal - ctrl+alt+T

pwd - tells the directory in which you are working


cd / - cd(change directory) to / (root directory)
ls - lists all the items in the current/home directory. (same work as ls
~) (~ also indicates home directory)

ls [options] [fd] - fd(files/directories)


Example: ls Documents/ - this command lists all the items in the
Documents directory.
Home directory and root directory are different.

clear - to clear the terminal

ls .. - means we want to print the contents of one folder back, like


suppose right now we are in home/programmingknowledge, and if we do ls,
then it will give us the contents of programmingknowledge directory. Now,
if we do, ls .., then this command will list the contents of home
directory. That means .. is used to go one folder back, or to the parent
folder of the currently opened folder.

Similarly, ls ../.. will go two folders back and so on.

ls -l - this gives the content of the folder in long format


user, rights, size, date and time for creation

drwxr - directory, read, write, execute, read -> these are the rights

first is the user's rights, then the group's rights

ls -a - gives you hidden files also


hidden files start with dot(.)

ls -al - combioning, hidden files in long format

ls -lS - listing in long form with sorted by size

ls Documents/*.html - you want to search for all files that end


with .html

ls Documents/*.* - all files with all extensions

ls >out.txt - save the results of the ls into some file named out.txt, if
it is not there, it will be created. The ">" arrow indicates the flow of
the stream, that the results will be input to the given file

man ls - like a manual or dictionary for linux commands

q - quit terminal

cd command
cd command is used to Change the shell working directory. Navigating from
one directory to another is done with the command cd taken over the
directory name. Change the current directory. With no arguments “cd”
changes to the users home directory. How to use the cd command, by The
Linux . cd command in Linux/Unix | change directory. Linux and UNIX cd
command help and examples. cp command in linux. mkdir command in linux.
cat command in linux. rmdir command in linux. pwd command in linux. grep
command in linux. clear command in linux. cd options linux

to change the current working directory

cd [dir] -
cd ~ means go to home directory

cd .. - go to parent of current folder

cd Documents - you are giving relative path here, means in whichever


directory you are in, you can find Documents in there
Alternatively, you can give absolute path. /home/Av/Documents

Suppose you have a folder named "My Books", notice that there is a space
between MY and BOOKS, so if you give cd My Books command, then it will
not locate it, because cd always looks for the first word after it.

There are three ways of locating such a folder which has a space in its
name.

1. cd My\ Books - this uses an escape character


2. cd "My Books" - include the name in the "".
3. cd 'My Books' - include the name in the ''.

************************
cat
cat command is used to show the content of a files and also to combine
several files together in one file. The cat command does not accept
directories as input. cat (Unix) . The cat Command. How To: Use cat
Command In Linux / UNIX. Linux and UNIX cat command help and examples.
cat - Unix, Linux Command . Searches related to cat command. cat command
windows. cat command examples. cp command, ls command. cat command in
Linux with examples. cat command terminal. cat command in UNIX. bash cat
command.

cat list1.txt - show the contents of the file


cat -n list1.txt - put numbering on each line
cat list1.txt list2.txt - show the contents of both the files one after
another

cat -s list1.txt - display the contents of the file by squeezing all the
line breaks into one line break. It does not ffect the other contents of
the file.

cat -E list1.txt - displays a "$" symbol at the end of every line to


indicate that it is the end of the line

cat > test.txt - whatever you type after this, will be saved into a file
named test.txt
press ctrl + D - to indicate the end of the file
*************************

*************************
Input/Output Redirection
capturing output from a file/command/program and sending it to another
file/command/program.

output > file


you can use it with echo and ls also
for example ls > homedir.txt
it will basically capture the output of the ls command and store it into
the homedir.txt file. No output will be shown to you in this case.
************************

************************
pipe command

lets say you want to send the output of a command to another command

for example: cat homedit.txt | wc


cat enlists all the contents of the homedir.txt file and "wc" is used for
word count, it gives lines, words and bytes used in the file.

you can use pipe command, to chain together multiple commands, sending
the output of each one to another.

other way of using redirection is:


wc < homedir.txt
this will directly do a word count of the homedir.txt file

wc << EOF lets you directly send data to wc command, and then when you
are done typing, you can type EOF, and it will give you the required
output.

"EOF" here is a text marker, you can use anything, but make sure to
choose something that would not normally occur in your text.

Standard Error and Standard Output

Lets say, you made a mistake in typing a command, so it will generate a


standard error, in a normal case, the ouput is displayed to the console
screen.

for example: ls Documents


*lists all the contents of the Documents directory*

ls docs
*displays a std error output saying that docs does not exist*

ls docs 2> output.txt


in this case, the std error, if there, is sent to the file output.txt
If there is no error, the std output is displayed on the screen and
nothing is sent to the output.txt file

to direct the std output to a command, use:


ls Documents 1>output.txt 2>error.txt
************************
*************************

*************************
echo

echo "some text"- displays that text on the console window by default

to put it into a file, you can do

echo "some text" > output.txt

now, if you do: echo "another text" > output.txt


it will replace the contents of that file.

if you want to append, you can use:


echo "another text" >> output.txt
**************************

apropos "What you want to search for" - used in case when you want to
find a command but you don't know the name of it.

touch - to create a file

mkdir - to create a folder


mkdir Documents/mydocs
or
mkdir my folder (this will create two folders namely, "my" and "folder")

to create one folder that has space in its name - mkdir "my folder" or
mkdir my\ folder

~ represents home directory


/ represents root directory

# is for sudo user

**************************
to copy a file to a folder

cp file_name(source) {separated by spaces} folder_name(destination) [if


there is a file with the same name in the destination folder, this
command will overwrite that, so we have to be careful]

to make a copy of a file with a different name

cp file_name1(source) file_name2(destination)
**************************
**************************
(mv command is used to move files/folders from one folder to another)

mv myfile Documents

mv myfile myfile5 -------[if we give a file name as source and another


file name as destination, it basically renames that file within the same
folder]
**************************

**************************
to remove a file

rm myfile (file names separated by spaces)


**************************

**************************
to remove a folder
rmdir folder_name (spearated by spaces)
**************************

**************************
wildcard pattern matching - works with any command that uses files or
directories. For example: ls or rm

* matches one or more characters or even empty strings


? matches only one character

example: ls a* - will give you all file names that start with a

example: la a*a - will give you all file names that start and end with a

example: ls ??? - gives all file names that are three character long

example: ls ?a? - gives all files that are three character long with an a
in the middle
**************************

**************************
file links

represented by l - link is a reference to a file in a different place

There are two kinds of links, called hard links and soft links (or
symbolic links).
To understand the difference, first we need to understand a little bit
about how file information is stored and referenced. When I have a file,
say users.txt, the actual data in the file is stored on the disc in a
series of data blocks. And the locations of those are stored in a
structure called an inode. And then the file system associates the name
of the file in its index of files with the data in that inode.
When we create a link, we tell the file system to associate the file with
a name we provide. A hard link associates that name with the inode of an
existing file, and a soft link associates the name we provide with a file
name of an existing file.
So if we make a hard link to users.txt and then rename users.txt, our
link will still point to the same information. But if we make a soft link
to users.txt and then rename users.txt, our soft, or symbolic, link will
break.

Because of how they work, a symbolic link, or sym link shows up to the
system as a short cut, or a reference to the referenced file. And a hard
link shows up as a regular file. In fact, all the files you see in your
file system, unless they are a soft link, are actually hard links
themselves.
**************************

**************************
finding files

if you create file with touch, then they take up no space by default.
if you want to create files and allocate space to them simultaneously, we
can use:
truncate -s 1MB file_name

find . -name apple [. means use this folder to find]


find . -name "*apple*" - this returns any files that have the word
"apple" in it

we can also find based on size


find . -size -10M [files less than 10MB will appear]
find . -size +10M[files greater than 10MB will appear]4

lets say you have a file named "lemon" and a folder named "lemon".
if you do:
find . -name "lemon"
it will fetch both the file and the folder

if you do:
find . -name "lemon" -type d [it will fetch only the folder/directory]

if you do:
find . -name "lemon" -type f [it will fetch only the file]

To find a link, you would use "L".


To find a character device, you'd use "C"
To find a block device, you'd use "B".
**************************
**************************
Comparing text files

Using "Diff"
It tells you the difference between two files.

diff -y text1.txt text2.txt

Pipe character (|), tells us that there is a change in this line.


Greater than character (>), tells us that the line is missing from one or
the other file
**************************

**************************
Comparing non text files

cmp text1.txt text2.txt


it will give you the first byte at which the given lines differ.

cmp -l text1.txt and text2.txt


it gives you byte at which the files differ and shows you the different
characters

if you want to see all the information, in the file in hexadecimal


format, you can use:
hexdump text1.txt
but we cannot analyse data like this

We need to use other tools to compare images or audios etc.


**************************

**************************
Archives and Compression
(combine files into one large file) (reduce the size of the
file)
(not necessarily compressed)

TAR is used (Tape Archive) - has an index also

tar -cf archive_name.tar * (-c for create and f to store the result into
a file) (you have to specify what set of files you want to archive, in
this case you want to archive all the files, so you cna say *)

to look at the contents of the archived file,


tar -tf archive_name.tar

to extract/unpack the files from an archived folder,


tar -xf archive_name.tar

to put the files into a different folder


tar -xf archive_name.tar -C otherfolder/
Two types of data compression
Lossy and Lossless
In Lossy compression, used in images, the similar neighbouring data is
removed

In Lossless compression, used mostly in text, it looks for patterns in


data and tries to replace that pattern wherever it finds it with a
smaller amount of data the represents the larger pattern.

Gzip and Bzip are common ways of compressing data.

tar -czf files.tgz file* text* (all the files and all the files that
start with the word text)
**************************

**************************
Regular Expressions

basically used to match certain patterns

you can use: cat users.txt | grep -E ".*" (last thing means all
characters)

cat users.txt | grep -E "a" or "A" or "[Aa]" or "[A-M][m-q]"


**************************

**************************
Changing Files Programmatically

We can use two tools - sed and AWK

Using sed

substitution:
cat users.txt | sed 's/e/d/' - s for substitute, letter "e", we want to
replace with letter "d".

But this replaces only the first instance of "e" with "d" in each line.
If you want all instances to be replaced, then you can give greedy (g).

cat users.txt | sed 's/e/d/g'


example: if you want to substitute all letters from A-E and a-e with an
underscore (_)
seds 's/[A-Ea-e]/_/g'
if you want to give range, you can give in brackets

If you want to remove all the characters after a space, you can basically
do, match characters after the space using regex and then replace them
with nothing

sed 's/\ .*//g'

escaping a space with backslash.


. matches any character, * matches one or more of those
we leave the replacement empty

This will give you a list of first names

Using AWK
awk is basically used to modify the files

example:
list all the first names or the first items in each line
cat users.txt | awk '{print $1}'

similarly, list all the second items in each row


cat users.txt | awk '{print $2}'

or we can print both


cat users.txt | awk '{print $1 "and" $2}'

you can rearrange output using sort


cat users.txt | awk '{print $1 "and" $2}' | sort

**************************
File Permissions

Define which users and groups access a file


Describe the actions user and groups can take

the persmissions section when listed is divided into a few sections

the first group represents the rights of the owner


second group - group ownership
last group - everyone else, like any other user
We can put them using matrix, where we give a unique number for each type
of permission, so that we can sum them up and there will be no ambiguity
as to what a sum means. So, we can give 2 for read, 4 for write and 1 for
execute.

User(u) Group(g) Others(o)

Read(r) 4 4 4

Write(w) 2 2

Execute(x) 1

7 6 4

764 - readable by everyone, writable by user and group, executable by


user only.
We can refer to them as hexadecimal codes.

Symbolic Notation:
set permission (=)
add permission (+)
remove permission (-)

Example: u=rw, g=rw, o=r

"stat mytext" lets you see the file permissions along with time stamps.

Now, lets say we want to modify the file permissions, we set


u=rw, g-rwx, o-rwx

we can do this using chmod command,


chmod 600 mytext
************************

************************
Root User

there's a user called root that acts as the super user. That is, a user
who's not constrained by any limitation. Everything is visible to root.
And, unless the file's encrypted, no file is out of root's reach.

Root's power can be temporarily borrowed with sudo.


It is used for system administration tasks.
sudoers are listed in /etc/sudoers.tmp (correct formatting is necessary
in this file, otherwise it will prevent everyone from using sudo)

we can add users in the sudo group using


sudo visudo command

Under User privilege specification, add:


username ALL=(ALL:ALL) ALL
************************

************************
Installing Software

We use the package manager tool apt


Advanced Packaging Tool (apt)

keeps track of software available from the Ubuntu repository, and lets us
install it, remove it, or otherwise manage it on our system

Before requesting software to install, it's a good idea to update the


package manager's cache with sudo apt update.

sudo apt install software_name


sudo apt remove software_name
************************

************************
Remote Access

When you're administrating systems, it's not always practical to have


physical access to them. In fact, as you deploy more servers and manage
more systems, it's likely that you won't be using any of them directly on
a daily basis. In order to access the system remotely, we can use a
protocol called SSH, or Secure Shell, to open a remote shell on a system
across a network. On many servers, the software that hosts the connection
for remote users requesting access, called OpenSSH Server, is already
installed.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy