Chapter 3 - Working in Linux
Chapter 3 - Working in Linux
Software that has no direct interaction with the monitor and keyboard of the machine it
runs on. Its purpose is to serve information to other computers, called clients.
Sometimes server applications may not talk to other computers but only sit there and
crunch data.
Linux excels at running server applications because of its reliability and efficiency. The
ability to optimize server operating systems with just needed components allows
administrators to do more with less, a feature loved by startups and large enterprises
alike.
Desk Applications
Web browsers, text editors, music players, or other applications with which users
interact directly. In many cases, such as a web browser, the application is talking to a
server on the other end and interpreting the data. This is the “client” side of a
client/server application.
Tools
A loose category of software that exists to make it easier to manage computer systems.
Tools can help configure displays, provide a Linux shell that users type commands into,
or even more sophisticated tools, called compilers, that convert source code to
application programs that the computer can execute.
The web page itself can either be static or dynamic. When the web browser requests a
static page, the web server sends the file as it appears on disk. In the case of a
dynamic site, the request is sent by the web server to an application, which generates
the content.
WordPress
is one popular example. Users can develop content through their browser in the
WordPress application, and the software turns it into a fully functional dynamic website.
Apache
NGINX
was launched in 2010 by Frank Karlitschek to provide software to store, sync and share
data from private cloud servers. It is available in a standard open source GNU AGPLv3
license and an enterprise version that carries a commercial license.
NextCloud
was forked from ownCloud in 2016 by Karlitschek and has been growing steadily since
then. It is provided under a GNU AGPLv3 and aims for “an open, transparent
development process.”
Both projects focus on providing private cloud software that meets the needs of both large
and small organizations that require security, privacy, and regulatory compliance. While
several other projects aim to serve the same users, these two are by far the largest in terms
of both deployment and project members.
The most well known MTA (software that is used to transfer electronic messages to
other systems) is Sendmail. Postfix is another popular one and aims to be simpler and
more secure than Sendmail.
Also called the Local Delivery Agent, it takes care of storing the email in the user’s
mailbox. Usually invoked from the final MTA in the chain.
POP/IMAP Server
The Post Office Protocol (POP) and Internet Message Access Protocol (IMAP) are
two communication protocols that let an email client running on your computer talk to a
remote server to pick up the email.
Dovecot - a popular POP/IMAP server owing to its ease of use and low
maintenance. Cyrus IMAP is another option. Some POP/IMAP servers implement
their own mail database format for performance and include the MDA if the custom
database is desired. People using standard file formats (such as all the emails in
one text file) can choose any MDA.
Microsoft Exchange - is shipped primarily as a software package/suite that includes all the
necessary or approved components, all from Microsoft, so there are few if any options to
make individual selections. In the open source world, many options can be modularly
included or swapped out for package components, and indeed some software packages or
suites are just a well-packaged set of otherwise individual components all harmoniously
working together.
allows a Linux machine to look and behave like a Windows machine so that it can
share files and participate in a Windows domain.
Samba implements the server components, such as making files available for sharing
and certain Windows server roles, and also the client end so that a Linux machine may
consume a Windows file share.
Netatalk
lets a Linux machine perform as an Apple Macintosh file server. The native file sharing
protocol for UNIX/Linux is called the Network File System (NFS).
NFS is usually part of the kernel which means that a remote file system can be
mounted (made accessible) just like a regular disk, making file access transparent to
other applications.
When a computer boots up, it needs an IP address for the local network so it can be
uniquely identified.
DHCP’s job is to listen for requests and to assign a free address from the DHCP pool.
The Internet Systems Consortium (known until January 2004 as the Internet Software
Consortium) also maintains the ISC DHCP server, which is the most common open
source DHCP server.
3.2.3.1 Email
Thunderbird
which are the GNOME and KDE projects' email clients. Standardization through POP
and IMAP and local email formats means that it’s easy to switch between email clients
without losing data.
3.2.3.2 Creative
Blender
3D movie creation
2D image manipulation
Audacity
audio editing
They have had various degrees of success in professional markets. Blender is used for
everything from independent films to Hollywood movies, for example. GIMP supports
high-quality photo manipulation, original artwork creation, graphic design elements, and
is extensible through scripting in multiple languages. Audacity is a free and open source
audio editing tool that is available on multiple operating systems.
3.2.3.3 Productivity
LibreOffice
LibreOffice Calc
is not limited to rows and columns of numbers. The numbers can be the source of a
graph, and formulas can be written to calculate values based on information, such as
pulling together interest rates and loan amounts to help compare different borrowing
options.
LibreOffice Writer
a document can contain text, graphics, data tables, and much more. You can link
documents and spreadsheets together, for example, so that you can summarize data in
a written form and know that any changes to the spreadsheet will be reflected in the
document.
LibreOffice can also work with other file formats, such as Microsoft Office or Adobe
Portable Document Format (PDF) files. Additionally, through the use of extensions,
LibreOffice can be made to integrate with Wiki software to give you a powerful intranet
solution.
**3.3.1 Shells
At the basic level, users interact with a Linux system through a shell whether
connecting to the system remotely or from an attached keyboard. The shell’s job is to
accept commands, like file manipulations and starting applications, and to pass those
to the Linux kernel for execution.
Programmers have taken favorite features from Bash and tcsh and made other shells, such
as the Korn shell (ksh) and the Z shell (zsh). The choice of shells is mostly a personal one;
users who are comfortable with Bash can operate effectively on most Linux systems. Other
shells may offer features that increase productivity in specific use cases.
Note
Consider This: The Nano editor was developed as a completely open source editor
that is loosely based on Pico, as the license for Pico is not an open source license and
forbids making changes and distributing it.
While Nano is simple and easy to use, it doesn’t offer the extensive suite of more advanced
editing and key binding features that an editor like Vi does. Administrators should strive to
gain some basic familiarity with Vi, though, because it is available on almost every Linux
system in existence. When restoring a broken Linux system by running in the distribution’s
recovery mode, Vi can be a critical tool, and the best time to learn Vim or any editor is before
you desperately need it to fix a broken system.
Note
There are also GUI-based front-end tools such as Yumex and Gnome PackageKit that
also make RPM package management easier.
Some RPM-based distributions have implemented the ZYpp (or libzypp) package
management style, mostly openSUSE and SUSE Linux Enterprise, but mobile
distributions MeeGo, Tizen and Sailfish as well.
zypper (command) - is the basis of the ZYpp method, and it features short and long
English commands to perform functions, such as zypper in packagename which installs a
package including any needed dependencies.
Most of the commands associated with package management require root privileges.
The rule of thumb is that if a command affects the state of a package, administrative
access is required. In other words, a regular user can perform a query or a search, but
to add, update or remove a package requires the command to be executed as the root
user.
Language itself maps closely to the generated machine code so that a skilled
programmer can write code that is small and efficient.\
When computer memory was measured in kilobytes, this was very important. Even with
large memory sizes today, C is still helpful for writing code that must run fast, such as
an operating system.
It has been extended over the years. There is C++, which adds object support to C (a
different style of programming), and Objective C that took another direction and is in
heavy use in Apple products.
Java
First imagines a hypothetical CPU called the Java Virtual Machine (JVM) and then
compiles all the code to that. Each host computer then runs JVM software to translate
the JVM instructions (called bytecode) into native instructions.
Interpreted languages
- Are translated to machine code as they execute.
- Also tend to offer more features than compiled languages, meaning that often less code is
needed. The language interpreter itself is usually written in another language such as C, and
sometimes even Java! This means that an interpreted language is being run on the JVM,
which is translated at runtime into actual machine code.
JavaScript
Note
Perl
PHP
Ruby
Another language that was influenced by Perl and Shell, along with many other
languages. It makes complex programming tasks relatively easy, and with the inclusion
of the Ruby on Rails framework, is a popular choice for building complex web
applications.
is also the language that powers many of the leading automation tools
like Chef and Puppet, which make managing a large number of Linux systems much
simpler.
Python
Another scripting language that is in general use. Much like Ruby it makes complex
tasks easier and has a framework called Django that makes building web applications
very easy. Python has excellent statistical processing abilities and is a favorite in
academia.
ImageMagick - One such library that lets programmers manipulate images in
code.It also ships with some command line tools that enable programmers to
process images from a shell and take advantage of the scripting capabilities there.
OpenSSL
is a cryptographic library that is used in everything from web servers to the command
line. It provides a standard interface for adding cryptography into a Perl script, for
example.
At a much lower level is the C library. The C library provides a basic set of functions for
reading and writing to files and displays, and is used by applications and other
languages alike.
3.6 Security
Administrators and computer users are increasingly aware of privacy concerns in both
their personal and professional lives. High-profile data breaches have been in the news
all too often recently, and the cost of these break-ins can reach into the millions of
dollars for the institutions that fall victim to hackers and ransomware attacks. Many
times the cause of these breaches is simply human error such as opening a suspicious
email or entering passwords into a phony login page.
Cookies are the primary mechanism that websites use to track you. Sometimes this
tracking is good, such as to keep track of what is in your shopping cart or to keep you
logged in when you return to the site.
Browsers typically offer cookie-related settings; users can opt to have the browser tell
the site not to track. This voluntary tag is sent in the request, and some sites will honor
it. The browser can also be set never to remember third-party cookies and remove
regular cookies (such as from the site you are browsing) after being closed.
Tweaking privacy settings can make you more anonymous on the Internet, but it can
also cause problems with some sites that depend on third-party cookies. If this
happens, you might have to explicitly permit some cookies to be saved.
Browsers also offer a private or incognito mode where cookies and tracking pixels are
deleted upon exiting the window. This mode can be helpful if you would like to search
for something without letting other websites know what you are looking for.
Finally, you should protect your computer from accepting incoming connections.
A firewall is a device that filters network traffic, and Linux has one built-in. If you are
using Ubuntu, then the Gufw is a graphical interface to Ubuntu’s Uncomplicated
Firewall (UFW).
Under the hood, you are using iptables, which is the built-in firewall system. Instead of
entering complicated iptables commands you use a GUI. While this GUI lets you build
an effective policy for a desktop, it barely scratches the surface of what iptables can do.
standard used on web servers to ensure that data transmitted between users and
online resources cannot be intercepted as it travels on the open Internet.
have been in use by companies to connect their remote servers and employees for
many years. Now they are gaining popularity amongst ordinary users looking to protect
their privacy online.
They work by creating an encrypted channel of communication between two systems,
so the data transmitted between them is scrambled by an algorithm only the systems
know.
Tor
has long been involved in creating privacy tools like it’s Tor Browser that works by
relaying internet requests through a network of servers that prevents websites and
others from learning the identity of the person making the request.
These tools are constantly evolving and choosing which ones are appropriate for the users
and systems involved is an essential part of the systems administrator's role.