Thursday 31 December 2020

Hostname Command Examples in Unix / Linux

LPI Exam Prep, LPI Tutorial and Material, LPI Prep, LPI Learning, LPI Career, LPI Certification

Hostname is the name of the system or server you are logged into. The hostname can also refer to the sitename or computer name. As an example, if an organization domain name is "google.com" and a specific computer name in that doman is "unix-box", then the hostname of the computer is "unix-box.google.com".

The syntax of hostname command in unix or linux system is

hostname [options] [file]

The options of hostname command are:

-a : Prints the alisa name of the host if created any.

-d : prints the domain name

-i : prints the ip address of the host

-s : prints the shortname of the host.

-v : verbose data

-V : version information

-h : help about hostname command

Hostname Command Examples:

1. Print the hostname of the system The basic functionality of the hostname command is to display the name of the system on the terminal. Just type the hostname on the unix terminal and press enter to print the hostname.

> hostname

unix-box.google.com

2. Ip address of the computer You can find the ip address of the computer by using the -i option with hostname command.

> hostname -i

125.20.223.69

LPI Exam Prep, LPI Tutorial and Material, LPI Prep, LPI Learning, LPI Career, LPI Certification
3. Print the domain name To know the domain name where the computer resides, use the -d option with hostname command.

> hostname -d

google.com

4. Short hostname By default the hostname command prints the complete name of the computer. You can print a short name by using the -s option. This prints the name upto the first dot in the full hostname.

> hostname -s

unix-box

5. Getting help To get help about the hostanme command either use the man command or the -h option with hostname command.

> man hostname

> hostname -h

Tuesday 29 December 2020

By our community, for our community

LPI Exam Prep, LPI Certification, LPI Tutorial and Material, LPI Guides, LPI Learning, LPI Career

In its 20th year, Linux Professional Institute (LPI) has turned a major corner. It’s restructured to be more accountable to our global community of open source professionals. With the launch of the Membership Program we’re now ready for the next step -- giving Members direct say in LPI’s direction. In the spring of 2021 we’re running the first election for our Board of Directors and we’d like you to consider being a candidate.

Anyone can apply to be a candidate for the Board -- you don’t need to be a Member of LPI or even a longtime part of our community. We’re looking for people who share LPI’s mission (to promote the use of open source by supporting the people who work with it) while bringing to us a broad range of skills, views and experience. We’re a global organization that seeks a Board as diverse as we are, and are especially looking for people with backgrounds in:

◉ Non-profit governance

◉ Finance and business management

◉ Open Source (of course)

◉ Promotion and advocacy

◉ Human Resources and Career Development

◉ Membership programs

◉ STEM and IT Education

◉ Skills standards and certification

If you have interest or experience in any of these fields, please consider applying to be a candidate for Director of LPI. You’ll be part of a great team, in charge or a large open source organization with a worthy mission and resources to follow that mission. You’ll help drive the future of open source by improving both the quality and quantity of skilled and ethical practitioners. For some, this kind of high-level participation can be good for career advancement and visibility.

Inside LPI this election is a Very Big Deal to us, as we see ourselves as more than deliverers of exams and issuers of certifications. LPI has always been about empowering the individual in open source, not only in technical skills but in career search, professional ethics and personal development. With a community as large and globally diverse as we now have, LPI must evolve to meet the needs of open source practitioners everywhere. As other open source organizations curtail or eliminate the role of the personal member, LPI moves to embrace and celebrate the individual’s contribution to the growth of open source.

After decades of following a foundation model through which decision-makers were appointed in private, our new bylaws chart a path to an LPI leadership -- its Board of Directors -- elected by our professional Members. The first step in our bylaw changes involved establishing the concept of an LPI Member, who has not only attained superior technical skills but committed to an ethical code of similarly high standards. It also means that, having established membership we owe these members transparency and accountability … and authority.

LPI Exam Prep, LPI Certification, LPI Tutorial and Material, LPI Guides, LPI Learning, LPI Career
The design and implementation of the process has been a multi-year team effort; the bylaw changes were simply the catalyst that informed what we had to do. Getting there involves many hard workers within our community -- staff, partners and volunteers -- but the result will be worth it. A recent milestone has been the successful formation of a Nomination Committee that will help create the ballot from which our members choose the candidates they see best suited to guide us in the coming years.

We designed an election process that best serves the community -- open, thorough and independent. I won’t explain all the details in this post, I’ve already recorded three webinars that detail the process here, here and here. While these webinars are not particularly entertaining or funny, they’re very informative and should help you understand how our election process works.

The third webinar, the most recent one as I write this, is about the most recent part of the process -- assisting anyone  interested in becoming a Director of LPI. The application to be a candidate is online. If you need more information, feel free to consult the above webinars or this page on the LPI website.

This first election will take place in the spring of 2021, ending at our Annual General Meeting where the votes will be counted and LPI gets its first elected Board.

We look forward to hearing from you. You’ll find it an effective use of your volunteer time, beneficial to both you, for LPI and for the global open source community. You may even find it exciting! But even if not, you’ll definitely find it rewarding.

Source: lpi.org

Thursday 24 December 2020

Linux Virtualization – Chroot Jail

Linux Virtualization, LPI Exam Prep, LPI Certification, LPI Guides, LPI Learning, LPI Study Materials

What is a chroot Jail?

A chroot on Unix operating systems is an operation that changes the apparent root directory for the current running process and its children. The programs that run in this modified environment cannot access the files outside the designated directory tree. This essentially limits their access to a directory tree and thus they get the name “chroot jail”.

The idea is that you create a directory tree where you copy or link in all the system files needed for a process to run. You then use the chroot system call to change the root directory to be at the base of this new tree and start the process running in that chrooted environment. Since it can’t actually reference paths outside the modified root, it can’t maliciously read or write to those locations.

Why is it required and how is it different from the virtual machines?

This is a Operating-system-level virtualization and is often used instead of virtual machines to create multiple isolated instances of the host OS. This is a kernel level virtualization and has practically no overhead as compared to Virtual Machines, which are a application layer virtualization, as a result it provides a very good method for creating multiple isolated instances on the same hardware. A virtual machine (VM) is a software implementation of a machine and they often exploit what is know as the Hardware Virtualization to render a virtual images of a working operating system.

How do i use it?

The basic command to create a chroot jail is as follows:

Read More: LPI Linux Essentials

chroot /path/to/new/root command

                OR

chroot /path/to/new/root /path/to/server

                OR

chroot [options] /path/to/new/root /path/to/server

Note: Only a root/privileged user can use the chroot system call. A non-privileged user with the access to the command can bypass the chroot jail.

Steps to create a mini-jail for the ‘bash’ and the ‘ls’ command

1. Create a directory which will act as the root of the command.

$ mkdir jailed

$ cd jailed

2. Create all the essential directories for the command to run:  Depending on your operating system, the required directories may change. Logically, we create all these directories to keep a copy of required libraries. To see what all directories are required, see Step 4.

$ mkdir -p bin lib64/x86_64-linux-gnu lib/x86_64-linux-gnu

3. Run the ‘which’ command : Run the ‘which’ command to find the location of ls and bash command. After running which command, copy those binaries in the ‘bin’ directory of our jail. Make sure you don’t have any of these commands aliased. From now on, we would be referring to our directory as ‘Jailed’ directory for convenience.

$ unalias ls          # Required only if you have aliased ls command

$ unalias bash        # Required only if you have aliased bash command

$ cp $(which ls) ./bin/

$ cp $(which bash) ./bin/

4. Copy appropriate libraries/objects : For the executables in our Jailed directory to work we need to copy the appropriate libraries/objects in the JAILED directory. By default, the executable looks at the locations starting with ‘/’. To find the dependencies we use the command ‘ldd’

$ ldd $(which bash)

    linux-vdso.so.1 =>  (0x00007ffc75dd4000)

    libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f6577768000)

    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6577564000)

    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f657719a000)

    /lib64/ld-linux-x86-64.so.2 (0x000055979f3fd000)

Run the following commands to create appropriate directories.

$ cp /lib/x86_64-linux-gnu/libtinfo.so.5 lib/x86_64-linux-gnu/

$ cp /lib/x86_64-linux-gnu/libdl.so.2 lib/x86_64-linux-gnu/

$ cp /lib/x86_64-linux-gnu/libc.so.6 lib/x86_64-linux-gnu/

$ cp /lib64/ld-linux-x86-64.so.2 lib64/

Similarly for ls,

$ ldd $(which ls)

    linux-vdso.so.1 =>  (0x00007fff4f05d000)

    libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f9a2fd07000)

    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9a2f93e000)

    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f9a2f6cd000)

    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9a2f4c9000)

    /lib64/ld-liux-x86-64.so.2 (0x000055e836c69000)

    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f9a2f2ac000)

$ cp /lib/x86_64-linux-gnu/libselinux.so.1 lib/x86_64-linux-gnu/

$ cp /lib/x86_64-linux-gnu/libc.so.6 lib/x86_64-linux-gnu/

$ cp /lib/x86_64-linux-gnu/libpcre.so.3 lib/x86_64-linux-gnu/

$ cp /lib/x86_64-linux-gnu/libdl.so.2 lib/x86_64-linux-gnu/

$ cp /lib64/ld-linux-x86-64.so.2  lib64/

$ cp /lib/x86_64-linux-gnu/libpthread.so.0 lib/x86_64-linux-gnu/

The final directory structure must be similar to this,

Linux Virtualization, LPI Exam Prep, LPI Certification, LPI Guides, LPI Learning, LPI Study Materials

5. Sudo chroot: Run this command  to change the root to the JAILED directory, along with the path to the shell. By default it will try to load ‘/bin/sh’ shell.

$  cd ..
$  sudo chroot jailed /bin/bash

You might face this error while running the chroot command,

chroot: failed to run command `/bin/bash': No such file or directory

This may be due to 2 reasons, either the file does not exist(which is obvious), or when the loading library fails or is not available. Double-Check if the libaries are in correct location.

6. A new shell must pop up: Its our jailed bash. We currently have only 2 commands installed, bash and ls. Fortunately cd and pwd are builtin commands in bash shell, and so you can use them as well.

Roam around the directory, try accessing ‘cd /../’ or something similar. Try to break the jail, probably you won’t be able to. 😐

To exit from the jail,

$ exit

The most important and interesting part is that, when you run,

$ ps aux

and find the process, you’ll find that there is only one process,

root     24958  …  03:21   0:00 /usr/bin/sudo -E chroot jailed/ /bin/bash

Interestingly, processes in the jailed shell run as a simple child process of this shell. All the processes inside the JAILED environment, are just simple user level process in the host OS and are isolated by the namespaces provided by the kernel, thus there is minimal overhead and as an added benefit we get isolation.

Similarly, you can add more commands to you virtual jailed environment. To add more complex programs, you might need to create more directories, like, ‘/proc’ and ‘/dev’. These increase the complexity of the process. Hopefully we do not require it for our purpose.

This is all you need to know about chroot and the jailing of directories. Our ultimate aim is to understand what are containers and how are services like AWS (Amazon Web Services), Google Cloud and Docker able to provide so many virtual instances of operating systems on demand. Also, how does sys-admin run multiple web-servers for multiple domains on a single physical machine. This was just one step towards understanding it 😐

Tuesday 22 December 2020

Linux Professional Institute LPIC-3 Enterprise Mixed Environment

The LPIC-3 certification is the culmination of the multi-level professional certification program of the Linux Professional Institute (LPI). LPIC-3 is designed for the enterprise-level Linux professional and represents the highest level of professional, distribution-neutral Linux certification within the industry. Three separate LPIC-3 specialty certifications are available. Passing any one of the three exams will grant the LPIC-3 certification for that specialty.

The LPIC-3 Enterprise Mixed Environment certification covers the administration of Linux systems enterprise-wide in a mixed environment.

Current version: 1.0 (Exam code 300-100)

Objectives: 300-100

Prerequisites: The candidate must have an active LPIC-2 certification to receive the LPIC-3 certification.

Requirements: Passing the 300 exam. The 90-minute exam is 60 multiple-choice and fill-in-the-blank questions.

Validity period: 5 years

Cost: Click here for exam pricing in your country.

Languages for exam available in VUE test centers: English, Japanese

LPIC-3 Enterprise Mixed Environment exam topics

◉ OpenLDAP Configuration

◉ OpenLDAP as an Authentication Backend

◉ Samba Basics

◉ Samba Share Configuration

◉ Samba User and Group Management

◉ Samba Domain Integration

◉ Samba Name Services

◉ Working with Linux and Windows Clients

Saturday 19 December 2020

Linux Professional Institute LPIC-3 Enterprise Security

LPI-3 Study Materials, LPI Exam Prep, LPI Tutorial and Material, LPI Guides, LPI Learning, LPI Certification

The LPIC-3 certification is the culmination of the multi-level professional certification program of the Linux Professional Institute (LPI). LPIC-3 is designed for the enterprise-level Linux professional and represents the highest level of professional, distribution-neutral Linux certification within the industry. Three separate LPIC-3 specialty certifications are available. Passing any one of the three exams will grant the LPIC-3 certification for that specialty.

The LPIC-3 Enterprise Security certification covers the administration of Linux systems enterprise-wide with an emphasis on security.

Current version: 2.0 (Exam code 303-200)

Objectives: 303-200

Prerequisites: The candidate must have an active LPIC-2 certification to receive the LPIC-3 certification.

Requirements: Passing the 303 exam. The 90-minute exam is 60 multiple-choice and fill in the blank questions.

Validity period: 5 years

Cost: Click here for exam pricing in your country.

Languages for exam available in VUE test centers: English, Japanese

LPI-3 Study Materials, LPI Exam Prep, LPI Tutorial and Material, LPI Guides, LPI Learning, LPI Certification
LPIC-3 Enterprise Security exam topics

◉ Cryptography

◉ Access Control

◉ Application Security

◉ Operations Security

◉ Network Security

Thursday 17 December 2020

Linux Professional Institute LPIC-3 Enterprise Virtualization and High Availability

LPI Exam Prep, LPI Tutorial and Material, LPI Certification, LPI Career, LPI Learning

The LPIC-3 certification is the culmination of the multi-level professional certification program of the Linux Professional Institute (LPI). LPIC-3 is designed for the enterprise-level Linux professional and represents the highest level of professional, distribution-neutral Linux certification within the industry. Three separate LPIC-3 specialty certifications are available. Passing any one of the three exams will grant the LPIC-3 certification for that specialty.

The LPIC-3 Enterprise Virtualization and High Availability certification covers the administration of Linux systems enterprise-wide with an emphasis on Virtualization & High Availability.

Current version: 2.0 (Exam code 304-200)

Objectives: 304-200

Prerequisites: The candidate must have an active LPIC-2 certification to receive the LPIC-3 certification.

Requirements: Passing the 304 exam. The 90-minute exam is 60 multiple-choice and fill in the blank questions.

Validity period: 5 years

Cost: Click here for exam pricing in your country.

Languages for exam available in VUE test centers​: English, Japanese

LPI Exam Prep, LPI Tutorial and Material, LPI Certification, LPI Career, LPI Learning
LPIC-3 Enterprise Virtualization and High Availability exam topics

1. Virtualization

2. High Availability Cluster Management

3. High Availability Cluster Storage

Tuesday 15 December 2020

cmp Command in Linux with examples

cmp command in Linux/UNIX is used to compare the two files byte by byte and helps you to find out whether the two files are identical or not.


◈ When cmp is used for comparison between two files, it reports the location of the first mismatch to the screen if difference is found and if no difference is found i.e the files compared are identical.

◈ cmp displays no message and simply returns the prompt if the the files compared are identical.

Syntax:

cmp [OPTION]... FILE1 [FILE2 [SKIP1 [SKIP2]]]

SKIP1 ,SKIP2 & OPTION are optional
and FILE1 & FILE2 refer to the filenames.

cmp Command, LPI Tutorial and Material, LPI Guides, LPI Certification, LPI Linux

The syntax of cmp command is quite simple to understand. If we are comparing two files then obviously we will need their names as arguments (i.e as FILE1 & FILE2 in syntax). In addition to this, the optional SKIP1 and SKIP2 specify the number of bytes to skip at the beginning of each file which is zero by default and OPTION refers to the options compatible with this command about which we will discuss later on.

cmp Example : As explained that the cmp command reports the byte and line number if a difference is found. Now let’s find out the same with the help of an example. Suppose there are two files which you want to compare one is file1.txt and other is file2.txt :

$cmp file1.txt file2.txt

1. If the files are not identical: the output of the above command will be :

$cmp file1.txt file2.txt
file1.txt file2.txt differ: byte 9, line 2

 /*indicating that the first mismatch found in
 two files at byte 20 in second line*/

2. If the files are identical: you will see something like this on your screen:

$cmp file1.txt file2.txt
$ _
/*indicating that the files are identical*/

Options for cmp command


1. -b(print-bytes): If you want cmp displays the differing bytes in the output when used with -b option.

//...cmp command used with -b option...//

$cmp -b file1.txt file2.txt
file1.txt file2.txt differ: 12 byte, line 2 is 154 l 151 i

/* indicating that the difference is in 12
 byte ,which is 'l' in file1.txt and 'i' in file2.txt.*/

The values 154 and 151 in the above output are the values for these bytes, respectively.

2. -i [bytes-to-be-skipped]: Now, this option when used with cmp command helps to skip a particular number of initial bytes from both the files and then after skipping it compares the files. This can be done by specifying the number of bytes as argument to the -i command line option.

//...cmp command used with -i option...//

$cmp -i 10 file1.txt file2.txt
$_

/*indicating that both files are identical
after 10 bytes skipped from both the files*/

Note that in cases like these (where you use -i to skip bytes), the byte at which the comparison begins is treated as byte number zero.

3. -i [bytes to be skipped from first file]: [bytes to be skipped from second file] :This option is very much similar to the above -i [bytes to be skipped] option but with the difference that now it allows us to input the number of bytes we want to skip from both the files separately.

//...cmp command used with -i option...//

$cmp -i 10:12 file1.txt file2.txt
$_

/*indicating that both files are identical
after 10 bytes skipped from first file and
12 bytes skipped from second file*/

4. -l option: This option makes the cmp command print byte position and byte value for all differing bytes.

//...cmp command used with -l option...//

$cmp -l file1.txt file2.txt
20   12   56
21  124   12
22  150  124
23  151  150
24  163  151
25   40  163
26  146   40
27  150  151
28   12   24
29  124  145
30  157  163

/*indicating that files are different
displaying the position of differing
bytes along with the differing bytes
 in both file*/

cmp Command, LPI Tutorial and Material, LPI Guides, LPI Certification, LPI Linux
The first column in the output represents the position (byte number) of differing bytes. The second column represents the byte value of the differing byte in the first file, while the third column represents the byte value of the differing byte in the second file.

5. -s option: This allows you to suppress the output normally produced by cmp command i.e it compares two files without writing any messages. This gives an exit value of 0 if the files are identical, a value of 1 if different, or a value of 2 if an error message occurs.

//...cmp command used with -s option...//

$cmp -s file1.txt file.txt
1

/*indicating files are different without
displaying the differing byte and line*/

6. -n [number of bytes to be compared] option: This option allows you to limit the number of bytes you want to compare ,like if there is only need to compare at most 25 or 50 bytes.

//...cmp command used with -n option...//

$cmp -n 50 file1.txt file2.txt
$_

/*indicating files are identical for starting
50 bytes*/

8. – -v option: This gives the output information and exits.

9. – -help option: This displays a help message and exits.

Sunday 13 December 2020

The Linux Kernel

The main purpose of a computer is to run a predefined sequence of instructions, known as a program. A program under execution is often referred to as a process. Now, most special purpose computers are meant to run a single process, but in a sophisticated system such a general purpose computer, are intended to run many processes simulteneously. Any kind of process requires hardware resources such are Memory, Processor time, Storage space, etc.

In a General Purpose Computer running many processes simulteneously, we need a middle layer to manage the distribution of the hardware resources of the computer efficiently and fairly among all the various processes running on the computer. This middle layer is referred to as the kernel. Basically the kernel virtualizes the common hardware resources of the computer to provide each process with its own virtual resources. This makes the process seem as it is the sole process running on the machine. The kernel is also responsible for preventing and mitigating conflicts between different processes.

This schematically represented below:

LPI Tutorial and Material, LPI Study Material, LPI Certification, LPI Career, LPI Learning
Figure: Virtual Resources for each Process

The Core Subsystems of the Linux Kernel are as follows:

1. The Process Scheduler
2. The Memory Management Unit (MMU)
3. The Virtual File System (VFS)
4. The Networking Unit
5. Inter-Process Communication Unit

LPI Tutorial and Material, LPI Study Material, LPI Certification, LPI Career, LPI Learning
Figure: The Linux Kernel

For the purpose of this article we will only be focussing on the 1st three important subsystems of the Linux Kernel.

The basic functioning of each of the 1st three subsystems is elaborated below:

◉ The Process Scheduler:

This kernel subsystem is responsible for fairly distributing the CPU time among all the processes running on the system simulteneously.

◉ The Memory Management Unit:

This kernel sub-unit is responsible for proper distribution of the memory resources among the various processes running on the system. The MMU does more than just simply provide separate virtual address spaces for each of the processes.

◉ The Virtual File System:

This subsystem is responsible for providing a unified interface to access stored data across different filesystems and physical storage media.

Saturday 12 December 2020

Introduction to Linux Operating System

Linux Operating System, LPI Exam Prep, Linux Tutorial and Material, Linux Guides, Linux Certification

Linux is a community of open-source Unix like operating systems that are based on the Linux Kernel. It was initially released by Linus Torvalds on September 17, 1991. It is a free and open-source operating system and the source code can be modified and distributed to anyone commercially or noncommercially under the GNU General Public License.

Initially, Linux was created for personal computers and gradually it was used in other machines like servers, mainframe computers, supercomputers, etc. Nowadays, Linux is also used in embedded systems like routers, automation controls, televisions, digital video recorders, video game consoles, smartwatches, etc. The biggest success of Linux is Android(operating system) it is based on the Linux kernel that is running on smartphones and tablets. Due to android Linux has the largest installed base of all general-purpose operating systems. Linux is generally packaged in a Linux distribution. 

Linux Distribution

Linux distribution is an operating system that is made up of a collection of software based on Linux kernel or you can say distribution contains the Linux kernel and supporting libraries and software. And you can get Linux based operating system by downloading one of the Linux distributions and these distributions are available for different types of devices like embedded devices, personal computers, etc. Around 600 + Linux Distributions are available and some of the popular Linux distributions are: 

◉ MX Linux

◉ Manjaro

◉ Linux Mint

◉ elementary

◉ Ubuntu

◉ Debian

◉ Solus

◉ Fedora

◉ openSUSE

◉ Deepin

Architecture of Linux

Linux architecture has the following components: 

Linux Operating System, LPI Exam Prep, Linux Tutorial and Material, Linux Guides, Linux Certification

1. Kernel: Kernel is the core of the Linux based operating system. It virtualizes the common hardware resources of the computer to provide each process with its virtual resources. This makes the process seem as if it is the sole process running on the machine. The kernel is also responsible for preventing and mitigating conflicts between different processes. Different types of the kernel are: 

◉ Monolithic Kernel
◉ Hybrid kernels
◉ Exo kernels
◉ Micro kernels

2. System Library: Isthe special types of functions that are used to implement the functionality of the operating system.

3. Shell: It is an interface to the kernel which hides the complexity of the kernel’s functions from the users. It takes commands from the user and executes the kernel’s functions.

4. Hardware Layer: This layer consists all peripheral devices like RAM/ HDD/ CPU etc.

5. System Utility: It provides the functionalities of an operating system to the user.

Advantages of Linux


◉ The main advantage of Linux, is it is an open-source operating system. This means the source code is easily available for everyone and you are allowed to contribute, modify and distribute the code to anyone without any permissions.

◉ In terms of security, Linux is more secure than any other operating system. It does not mean that Linux is 100 percent secure it has some malware for it but is less vulnerable than any other operating system. So, it does not require any anti-virus software.

◉ The software updates in Linux are easy and frequent.

◉ Various Linux distributions are available so that you can use them according to your requirements or according to your taste.

◉ Linux is freely available to use on the internet.

◉ It has large community support.

◉ It provides high stability. It rarely slows down or freezes and there is no need to reboot it after a short time.

◉ It maintain the privacy of the user.

◉ The performance of the Linux system is much higher than other operating systems. It allows a large number of people to work at the same time and it handles them efficiently.

◉ It is network friendly.

◉ The flexibility of Linux is high. There is no need to install a complete Linux suit; you are allowed to install only required components.

◉ Linux is compatible with a large number of file formats.

◉ It is fast and easy to install from the web. It can also install on any hardware even on your old computer system.

◉ It performs all tasks properly even if it has limited space on the hard disk.

Disadvantages of Linux


◉ It is not very user-friendly. So, it may be confusing for beginners.

◉ It has small peripheral hardware drivers as compared to windows.

Is There Any Difference between Linux and Ubuntu?


The answer is YES. The main difference between Linux and Ubuntu is Linux is the family of open-source operating systems which is based on Linux kernel, whereas Ubuntu is a free open-source operating system and the Linux distribution which is based on Debian. Or in other words, Linux is the core system and Ubuntu is the distribution of Linux. Linux is developed by Linus Torvalds and released in 1991 and Ubuntu is developed by Canonical Ltd. and released in 2004.

Thursday 10 December 2020

The experience of taking an LPI exam online

LPI Exam Prep, LPI Tutorial and Material, LPI Certification, LPI Prep, LPI Career, LPI Preparation

Linux Professional Institute (LPI) recently announced that the LPIC-1 exams are available in Japanese online, along with the Linux Essentials exam. You can use Pearson’s OnVUE platform to take these exams. In this posting, I’ll describe what I experienced taking a test through OnVUE. My experience may be useful to readers interested in taking the exams in any language, including English.

What is the OnVUE exam?

LPI exams started in paper form in the year 2000, but quickly went to computer-based-testing (CBT) at Pearson’s VUE centers in many countries. Earlier this year, Pearson created OnVUE for online testing—also known as Internet-based-testing (IBT)—and LPI made that an additional option. Initially, only English was offered. LPI has gradually been adding other languages, and since August the LPIC-1 exams can be taken in Japanese.

OnVUE allows us to take the exam wherever a suitable personal computer is available, such as at home, in a workplace, or at a university. Currently, OnVUE works only on Windows PCs and Apple Macintosh computers. But I know that LPI is working on a solution to make online testing available for Linux. This time, I took my exam with my personal MacBook Pro running the macOS operating system.

Before the exam, I downloaded OnVUE’s test software to my computer. During the exam, an OnVUE staff person known as a proctor monitored me through a webcam to make sure I didn’t consult documentation or other people during the exam.

Here's how I experienced registering for and completing the OnVUE exam.

Before the Exam (registration)

LPI Registration

First of all, If you haven’t yet registered with LPI as a test-taker, do it now at the LPI website (the site is in English). The site will assign you a unique LPI-ID, which you need in order to take the test at OnVUE.

Selecting the Exam

Go to OnVUE’s LPI website and select the exam you want to take. You will be asked to enter your LPI-ID.

The online exams always say “(OnVUE Online Exam)” at the end of their names. To select Linux Essentials, for instance, choose. "010-160v Linux Essentials Certificate Exam. version 1.6 (OnVUE Online Exam)" as shown in Figure 1.

LPI Exam Prep, LPI Tutorial and Material, LPI Certification, LPI Prep, LPI Career, LPI Preparation
Figure 1. Selecting an online exam to take

More information in Japanese about taking OnVUE exams is available at the Japanese OnVUE website.

Pre-test verification


Three days before the exam, I received an email message about it. At this point, I did a system test to make sure my system is compatible with OnVUE.

The purpose of the system test is to verify that the PC you are using meets the specifications for the exam. I started the process 30 minutes before the exam, but you can do  it any time after receiving the email invitation. An OnVUE webpage describes the system requirements in detail.

To run the system test, click on the system test link in the email invitation. You can then select the test software and download it according to your computer's environment. For instance, I used a MacBook Pro/macOS, so I downloaded the macOS version of the software.

After you install the downloaded software, the system check will start. It will determine whether:

◉ Your computer has a webcam (On MacBook Pro, it’s standard equipment.)

◉ You can use a microphone (On MacBook Pro, it’s standard equipment)

◉ You can use the network

If those parts of the system are present and working, the system check concludes successfully.

Personal verification


On the day of the test, you can log in 30 minutes before the time specified for the start of the exam. If you are more than 15 minutes late, you will not be able to take the exam.

The check-in process involves the following steps, using your smartphone.

1. Obtain a picture of your face. Use your smartphone's camera to get a mugshot of your face so that it fits within the range specified in the instructions.

2. Submit proof of identity. You can choose between a passport and a driver's license for identification. If you use a driver's license, you will need to send photos of both the front and the back.

3. Upload a photo of your work space. Normally you send four pictures: the front, back, and both sides of the computer you are using.

4. Close all apps on the computer except the OnVUE app you started.

If you successfully complete these steps, you can take the exam at the specified time.

During the exam


Ten to fifteen minutes before the exam, the proctor contacts you via text chat. Communication with the proctor is in English. I found that the proctor didn't say anything very difficult. If you have a level of English sufficient for overseas travel, you should be able to communicate with the proctor.

The proctor will tell you whether you need to change anything in your environment. For instance, my proctor told me there was "too much stuff around the computer for the exam". I was in my home living room, and I thought I had already eliminated books, computers, tablets, and other items that could be suspected of being used for cheating, but I had not done enough. I ended up taking my test computer to the hallway upstairs, where there was nothing around. I actually turned my body in a circle while holding the MacBook Pro, so that its camera could show the entire hallway to the proctor. I confirmed that I would be able to take the test there.

The exam then began. I had taken the LPIC exam before, and the display on the computer was the same as the display on the computer in the testing room.

The window for chatting with the proctor is open during the exam. If you have a problem during the exam, you can ask questions there.

Once you complete the exam, the results are announced on the spot. You will also receive a couple of email messages. You can follow the instructions in the email to download a PDF certificate (see Figure 2).

LPI Exam Prep, LPI Tutorial and Material, LPI Certification, LPI Prep, LPI Career, LPI Preparation
Figure 2. Certificate showing a successful exam.

Reflections


I was able to answer the questions with confidence because I have been developing my skills in the field of GPL/OSS along with its development. Therefore, I was sure that I would pass the test. I read the Linux Essentials exam preparation book, which offered some knowledge about the GPL and the different types of open source licenses.

Despite  the need to move my computer at the last minute, I found it very easy to take an LPI test at home. You don't have to go to the test center, and you can use a familiar environment to take the test. This is particularly valuable for people who live far away from any test center.

If you can't create an environment acceptable to OnVUE—for instance, if you live in a small studio and can’t clear away all your belongings—or find a compatible computer, try one of the following:

◉ Organize your room with a basic policy of not leaving things around.

◉ Consider using rental space.

◉ Use unused meeting rooms when you’re at your company or school.

If you prepare properly in advance, you will be able to take the test without any worries. Why not take this opportunity to get an LPI certification online?

Source: lpi.org

Tuesday 8 December 2020

The .lpi command

.lpi command, LPI Tutorial and Materials, LPI Exam Prep, LPI Learning, LPI Prep

The .lpi command sets the number of lines per inch for output. If the printer does not support the specified number of lines per inch, this command has no affect.

Note:

It may be necessary to change the term setting to get the required number of lines to print on a page.

Syntax


.lpi number.lines

Parameter(s)


number.lines - Specifies the number of lines per inch. The default is 6.

Learn More


Linux Professional


.lpi command, LPI Tutorial and Materials, LPI Exam Prep, LPI Learning, LPI Prep
Linux Professional Institute‘s Linux Professional Track is designed to evaluate the knowledge and skills of Linux systems administrators. To keep pace with evolving technology, the exam objectives are updated on average every three years and Linux Professional Institute certifications are valid for five years before you must recertify or certify at a higher level.

Linux Professional Institute LPIC-1 tests ability to perform maintenance tasks with the command line, install and configure a computer running Linux and be able to configure basic networking.

Prerequisites: There are no prerequisites for this certification.

Requirements: Passing the 101 and 102 exams. Each 90-minute exam is 60 multiple-choice and fill-in-the-blank questions.

Validity period: 5 years unless retaken or higher level is achieved.

101-500: Linux Administrator - 101 (LPIC-1 101)
102-500: Linux Administrator - 102 (LPIC-1 102)

Linux Professional Institute LPIC-2 tests ability to administer small to medium–sized mixed networks.

Prerequisites: An active LPIC-1 certification.

Requirements: Passing exams 201 and 202. Each 90-minute exam is 60 multiple-choice and fill-in-the-blank questions.

Validity period: 5​ years unless retaken or higher level is achieved.

201-450: Linux Engineer - 201 (LPIC-2 201)
202-450: Linux Engineer - 202 (LPIC-2 202)

Linux Professional Institute LPIC-3 Enterprise Mixed Environment tests ability to integrate Linux services in an enterprise-wide mixed environment.

Prerequisites: An active LPIC-2 certification.

Requirements: Passing the 300 exam. The 90-minute exam is 60 multiple-choice and fill-in-the-blank questions.

Validity period: 5 years

LPIC-3 300: Linux Enterprise Professional Mixed Environment

Linux Professional Institute LPIC-3 Enterprise Security tests ability to secure and harden Linux-based servers, services and networks enterprise-wide.

Prerequisites: An active LPIC-2 certification.

Requirements: Passing the 303 exam. The 90-minute exam is 60 multiple-choice and fill in the blank questions.

Validity period: 5 years

LPIC-3 303: Linux Enterprise Professional Security

Linux Professional Institute LPIC-3 Enterprise Virtualization and High Availability tests ability to plan and implement enterprise-wide virtualization and high availability setups using Linux-based technologies.

Prerequisites: An active LPIC-2 certification.

Requirements: Passing the 304 exam. The 90-minute exam is 60 multiple-choice and fill in the blank questions.

Friday 4 December 2020

Open source careers: How Alejandro switched an education center over to using Linux

LPI Exam Prep, LPI Tutorial and Material, LPI Certification, LPI Career

In 2016 I was working at CEA Noroeste, an Adult Education Center in Caravaca de la Cruz, Murcia (Spain). I remember having a lot of fun there, as my work combined two of my passions: languages and computers. My daily tasks fortuitously included both teaching English and maintaining the school's computers.

Touring the four buildings of the school, I had discovered a few computers running Windows XP, whose official support ended in 2014. Regarding these machines, which were obsolete and practically useless in their current state, I thought: Why not give FOSS a chance?  After all, we were in a school, so installing some modern free software would be sharing knowledge, right?

Opening to open

In a conversation with the headmistress, she gave me the thumbs up. Our mission was clear: to repair as many old computers as we could, and possibly buy some new ones. On one condition, though: they had to run a GNU/Linux distro!

Plan comes together

For our mission to reach a safe haven, we needed to start with a good plan that engaged both the community and the right technology. On the community side, I quickly told my fellow teachers about the computing shift, so they could start becoming acquainted with free and open source software. On the technical side, I had to decide on the operating system and the rest of the tools to deploy our strategy in an efficient fashion.

Ubuntu 16.04 became our chosen vehicle, as Ubuntu  wasn’t totally unknown and provided broader hardware compatibility.

My colleagues' main concern was to be able to keep working with the familiar documents and spreadsheets they had developed with Microsoft Office utilities, so we went for PlayOnLinux, a graphical frontend for Wine. Finally, I would use good old Clonezilla for system cloning.

Deployment day

Now, with a clear picture in my mind, I sat in front of one of the old computers and installed Ubuntu Xenial Xerus. I set it up in a way that both students and teachers hardly noticed the transition from one OS to the other: I created a few desktop shortcuts, installed a couple of programs they were used to, and fine-tuned PlayOnLinux to let them work smoothly with the Microsoft Office version we were using.

LPI Exam Prep, LPI Tutorial and Material, LPI Certification, LPI Career
Finally, I created a Clonezilla image of the system. I repeated the procedure with one of the new computers so that we ended up having two master images; then, I made a couple live USB drives with Clonezilla: I was ready to go.

It took me a week to deploy the images throughout all computers across all the buildings. And then the day came when the students would use them—their first contact with a free OS. Apart from a few cases in which I had to provide some education on certain topics, most people adapted really well to the new OS and did exactly the same things that they were used to—sometimes even more. Some of them were pleased to have discovered Ubuntu and even considered installing it on their laptops. I was satisfied with the results and felt we have succeeded as a school community.

As I write these closing lines, the memory of a twenty-year-old -- Alexandru --  comes back to mind. He was probably the student in that earlier school who showed the most interest in free and open source. He was very intelligent and really had a passion for computers. I wonder what's become of him… Who knows? Maybe he ended up being an LPI certified professional!

Source: lpi.org

Wednesday 2 December 2020

Right-to-Left Scripts and other Translation Challenges

LPI Exam Prep, LPI Tutorial and Material, LPI Certification, LPI Guides, LPI Career

There are many learning materials about Linux and other free technologies on the Web, free of charge and accessible around the world. But one big barrier keeps many people from reading them: most are written in English, which billions of people do not know or aren’t comfortable with. Books and courses where you can learn English are not as easy as get as Linux, because most of these materials are not free or not available in many locations. Thus, the ocean of learning material for free software becomes useless for many.

The question regularly enters my mind: "Is it fair?". For me, the answer is definitely, "No!". So what can I do about it? Joining a translation movement is the answer I found.

Representing the needs of a relatively small group

In Farsi, the first language I speak, a lack of Linux resources is observable. Unlike for some languages such as German or Spanish, significant action has not been taken in Farsi to solve this problem. This information gap may be the most important reason that I contributed to the LPI team and started to translate. People for whom whose Farsi is their native language  (basically Iranians—Farsi is also sometimes called Persian)  are in the minority. Therefore they have a small share of the publication market.

In recent years, more Farsi-speaking people have become familiar with Linux and use it more widely; however, the factors just mentioned result in a lack of attention to translation to Farsi. Additionally, sometimes Linux professionals who speak Farsi know English well—as I do—and aren’t motivated to translate materials to Farsi for their colleagues.

Despite all problems that I said, translation to Farsi has accelerated in recent years, and every day more people join the effort. This article summarizes the challenges and problems that I faced during translation. Generally, I categorize them into two categories; tools problems and translation dilemmas. However, these two issues are not isolated; they affect each other.

Tool challenges with right-to-left scripts

Farsi has some characteristics that distinguish it from commonly used languages. It is a right-to-left written language—undoubtedly the most significant difference between Farsi and other popular languages. Farsi shares this trait with a few other languages, notably Arabic.

So the most significant tool difficulty I found is that almost all software is designed based on left-to-right languages, and either have no concept of a right-to-left language or tack on support as an additional feature that isn’t well designed or integrated.

I was fortunate to find that OmegaT, the software that the Farsi team used for translation, supported Farsi, but there was a weird problem. Sometimes, when I tried to position the cursor on a line to edit or replace a word, I could not select the right one.

I am sure many readers are confused when I say this. Let me explain it by an example: Suppose you are editing the English sentence "I want to edit this wrng word." You want to replace "wrng" with "wrong." So you select "wrng" or put the cursor after it and use the Delete or Backspace key. Simple enough in a left-to-right language. But supposed that instead of deleting "wrng," the editor deletes "want." Sound weird? Believe me, it happened.

In short,  the editor got confused about where the cursor was in a right-to-left language. It was so confusing and difficult to select a word that sometimes I would rewrite a whole line simply to edit a word.  Other times, I copied the text to another editor, replaced the word I wanted to change, and copied it back to OmegaT. Recently I found a new workaround that is a little more efficient: I press "ctrl+Enter" in the middle of the line. The line splits into two or more parts. Then I can easily select the word and edit it, after which I can recombine the lines.

Translation dilemmas

Many of the issues I have to face,  when choosing words and phrases, have been troubling translators forever.  The first is the choice between fidelity and simplicity. Let me explain it with a question: should a translator translate the text word by word without any change in the structure, or am I allowed to modify the word order to make it simple for readers in the target language? This is not limited to English-to-Farsi translation; translators in other languages struggle with the same problem. There is no right answer. I generally try to make few changes, but in some situations, modification is inevitable.

LPI Exam Prep, LPI Tutorial and Material, LPI Certification, LPI Guides, LPI Career

Next, have you ever read an article in your native language that you could not understand? Now imagine being a non-native person who wants to translate it! The most complicated challenge for me was finding ambiguities in the original text. Sometimes, I would read a paragraph several times. Then I asked myself, "Is the text ambiguous, or do I just have trouble due to my limited knowledge of English?" In either case, understanding the meaning is impossible except by finding the writer and asking him or her. Luckily, I sometimes reached an understanding by doing web searches for phrases I could not understand. Seeing them in other texts, where I could get their meanings, helped me figure out their purpose and translate them. Another recourse I had was asking the LPI team for help. Getting every single phrase right because text is like a line of dominoes: misunderstanding one paragraph can lead to more errors in later paragraphs. It can results in a text that is severely different from the original text.

The next problem in this category involves cultural references. People sometimes mention something related to a country's culture, religion, politics, sport, etc. For example, consider "he is better than the Oracle of Omaha”; you find the phrase meaningless if you do not possess the background culture that is behind this sentence. For these situations, the best way is to consult a search engine. But that’s just the first step in handling the text. To come up with an appropriate translation, you need to do more. You have to explain these references in your translation because, in the absence of an adequate explanation, readers from different cultures can not understand the references. In some cases, one phrase in the original text could translate into several sentences or require a footnote.

The last dilemma in this category is finding equivalent terms. A lot of English technical words enter Farsi directly, and no common translation exists. People use the original English words regularly Farsi speech and writing, and are not accustomed to hearing the Farsi equivalents. It would be awkward to translate a term such as “DevOps” into the precise Farsi words for “development” and “operations.” On the other hand, using a lot of English words like that leaves you with text that is basically English.

When people adopt a foreign word instead of looking for a translation, sometimes they transliterate the sounds into their native script; other times they stick in the original word. As an example of the first solution, we write "Linux" in Farsi as "لینوکس" ".لینوکس" is not a translation of Linux; it is just the same sounds rendered in the Farsi alphabet. The other solution, often used for abbreviations such as "TLS" or "PaaS," is to keep them in the original English alphabet.  This combination results in technical problems, especially in web pages. This is because, like software, web pages were designed basically for left-to-right languages. A single line mixing English words with Farsi words will mess up in a way that becomes unreadable. Also, some punctuation characters such as / (slash) or – (hyphen) make the text messy too. This is more than a translation challenge; we need more sophisticated layout software in web browsers to fix it.

Finding a balance between these choices is like walking on a tight-rope! Sometimes I read my translated text over and over, asking myself, "Could a normal reader understand it?" or "Is it really in Farsi?". Nevertheless, my choices can never be perfect. Based on the users' background about the technical text, their opinion could be different.

Despite all of these challenges, more and more people have joined the community translating technical documents to Farsi. The movement is not just limited to Linux, but takes place in other fields related to technology and science. We are still near the beginning of the process, and I am sure if it continues, Farsi will be given more attention. Maybe developers in the field of design are also thinking about the problems of right-to-left languages in software tool and web pages, and are fixing them. I am optimistic about the future.

Source: lpi.org