Thursday, 8 August 2019

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

LPIC-1 Linux Administrator, LPI LPIC-1 Certification, LPIC-1 Practice Test, LPIC-1 Study Guide, LPI Certification, 102-500 LPIC-1, 102-500 Online Test, 102-500 Questions, 102-500 Quiz, 102-500, LPI 102-500 Question Bank

The world’s largest and most recognized Linux Certification


LPIC-1 is the first certification in LPI’s multi-level Linux professional certification program. The LPIC-1 will validate the candidate's ability to perform maintenance tasks on the command line, install and configure a computer running Linux and configure basic networking.

The LPIC-1 is designed to reflect current research and validate a candidate's proficiency in real world system administration. The objectives are tied to real-world job skills, which we determine through job task analysis surveying during exam development.

Current Version: 5.0 (Exam codes 102-500)

Objectives: 102-500

Prerequisites: There are no prerequisites for this certification

Requirements: Passing exams 102

Validity Period: 5 years

Languages: English, German, Japanese, Portuguese, Chinese (Simplified) and Chinese (Traditional). Exams in following languages will be released in 2019: Italian, Spanish, French.



To become LPIC-1 certified the candidate must be able to:

◈ understand the architecture of a Linux system;
◈ install and maintain a Linux workstation, including X11 and setup it up as a network client;
◈ work at the Linux command line, including common GNU and Unix commands;
◈ handle files and access permissions as well as system security; and
◈ perform easy maintenance tasks: help users, add users to a larger system, backup and restore, shutdown and reboot.

LPIC-1 Linux Administrator, LPI LPIC-1 Certification, LPIC-1 Practice Test, LPIC-1 Study Guide, LPI Certification, 102-500 LPIC-1, 102-500 Online Test, 102-500 Questions, 102-500 Quiz, 102-500, LPI 102-500 Question Bank

LPIC-1 Exam 102


Exam Objectives Version: Version 5.0

Exam Codes: 102-500

About Objective Weights: Each objective is assigned a weighting value. The weights indicate the relative importance of each objective on the exam. Objectives with higher weights will be covered in the exam with more questions.

Topic 105: Shells and Shell Scripting


105.1 Customize and use the shell environment

Weight: 4

Description: Candidates should be able to customize shell environments to meet users' needs. Candidates should be able to modify global and user profiles.

Key Knowledge Areas:

◈ Set environment variables (e.g. PATH) at login or when spawning a new shell.
◈ Write Bash functions for frequently used sequences of commands.
◈ Maintain skeleton directories for new user accounts.
◈ Set command search path with the proper directory.

The following is a partial list of the used files, terms and utilities:

◈ .
◈ source
◈ /etc/bash.bashrc
◈ /etc/profile
◈ env
◈ export
◈ set
◈ unset
◈ ~/.bash_profile
◈ ~/.bash_login
◈ ~/.profile
◈ ~/.bashrc
◈ ~/.bash_logout
◈ function
◈ alias

105.2 Customize or write simple scripts

Weight: 4

Description: Candidates should be able to customize existing scripts, or write simple new Bash scripts.

Key Knowledge Areas:

◈ Use standard sh syntax (loops, tests).
◈ Use command substitution.
◈ Test return values for success or failure or other information provided by a command.
◈ Execute chained commands.
◈ Perform conditional mailing to the superuser.
◈ Correctly select the script interpreter through the shebang (#!) line.
◈ Manage the location, ownership, execution and suid-rights of scripts.

The following is a partial list of the used files, terms and utilities:


◈ for
◈ while
◈ test
◈ if
◈ read
◈ seq
◈ exec
◈ ||
◈ &&

Topic 106: User Interfaces and Desktops


106.1 Install and configure X11

Weight: 2

Description: Candidates should be able to install and configure X11.

Key Knowledge Areas:

◈ Understanding of the X11 architecture.
◈ Basic understanding and knowledge of the X Window configuration file.
◈ Overwrite specific aspects of Xorg configuration, such as keyboard layout.
◈ Understand the components of desktop environments, such as display managers and window managers.
◈ Manage access to the X server and display applications on remote X servers.
◈ Awareness of Wayland.

The following is a partial list of the used files, terms and utilities:


◈ /etc/X11/xorg.conf
◈ /etc/X11/xorg.conf.d/
◈ ~/.xsession-errors
◈ xhost
◈ xauth
◈ DISPLAY
◈ X

106.2 Graphical Desktops

Weight: 1

Description: Candidates should be aware of major Linux desktops. Furthermore, candidates should be aware of protocols used to access remote desktop sessions.

Key Knowledge Areas:

◈ Awareness of major desktop environments
◈ Awareness of protocols to access remote desktop sessions

The following is a partial list of the used files, terms and utilities:


◈ KDE
◈ Gnome
◈ Xfce
◈ X11
◈ XDMCP
◈ VNC
◈ Spice
◈ RDP

106.3 Accessibility

Weight: 1

Description: Demonstrate knowledge and awareness of accessibility technologies.

Key Knowledge Areas:

◈ Basic knowledge of visual settings and themes.
◈ Basic knowledge of assistive technology.

The following is a partial list of the used files, terms and utilities:


◈ High Contrast/Large Print Desktop Themes.
◈ Screen Reader.
◈ Braille Display.
◈ Screen Magnifier.
◈ On-Screen Keyboard.
◈ Sticky/Repeat keys.
◈ Slow/Bounce/Toggle keys.
◈ Mouse keys.
◈ Gestures.
◈ Voice recognition.

Topic 107: Administrative Tasks


107.1 Manage user and group accounts and related system files

Weight: 5

Description: Candidates should be able to add, remove, suspend and change user accounts.

Key Knowledge Areas:

◈ Add, modify and remove users and groups.
◈ Manage user/group info in password/group databases.
◈ Create and manage special purpose and limited accounts.

The following is a partial list of the used files, terms and utilities:


◈ /etc/passwd
◈ /etc/shadow
◈ /etc/group
◈ /etc/skel/
◈ chage
◈ getent
◈ groupadd
◈ groupdel
◈ groupmod
◈ passwd
◈ useradd
◈ userdel
◈ usermod

107.2 Automate system administration tasks by scheduling jobs

Weight: 4

Description: Candidates should be able to use cron and systemd timers to run jobs at regular intervals and to use at to run jobs at a specific time.

Key Knowledge Areas:

◈ Manage cron and at jobs.
◈ Configure user access to cron and at services.
◈ Understand systemd timer units.

The following is a partial list of the used files, terms and utilities:

◈ /etc/cron.{d,daily,hourly,monthly,weekly}/
◈ /etc/at.deny
◈ /etc/at.allow
◈ /etc/crontab
◈ /etc/cron.allow
◈ /etc/cron.deny
◈ /var/spool/cron/
◈ crontab
◈ at
◈ atq
◈ atrm
◈ systemctl
◈ systemd-run

107.3 Localisation and internationalisation

Weight: 3

Description: Candidates should be able to localize a system in a different language than English. As well, an understanding of why LANG=C is useful when scripting.

Key Knowledge Areas:

◈ Copy, move and remove files and directories individually
◈ Copy multiple files and directories recursively
◈ Remove files and directories recursively
◈ Use simple and advanced wildcard specifications in commands
◈ Using find to locate and act on files based on type, size, or time
◈ Usage of tar, cpio and dd

Terms and Utilities:

◈ /etc/timezone
◈ /etc/localtime
◈ /usr/share/zoneinfo/
◈ LC_*
◈ LC_ALL
◈ LANG
◈ TZ
◈ /usr/bin/locale
◈ tzselect
◈ timedatectl
◈ date
◈ iconv
◈ UTF-8
◈ ISO-8859
◈ ASCII
◈ Unicode

Topic 108: Essential System Services


108.1 Maintain system time

Weight: 3

Description: Candidates should be able to properly maintain the system time and synchronize the clock via NTP.

Key Knowledge Areas:

◈ Set the system date and time.
◈ Set the hardware clock to the correct time in UTC.
◈ Configure the correct timezone.
◈ Basic NTP configuration using ntpd and chrony.
◈ Knowledge of using the pool.ntp.org service.
◈ Awareness of the ntpq command.

The following is a partial list of the used files, terms and utilities:

◈ /usr/share/zoneinfo/
◈ /etc/timezone
◈ /etc/localtime
◈ /etc/ntp.conf
◈ /etc/chrony.conf
◈ date
◈ hwclock
◈ timedatectl
◈ ntpd
◈ ntpdate
◈ chronyc
◈ pool.ntp.org

108.2 System logging

Weight: 4

Description: Candidates should be able to configure rsyslog. This objective also includes configuring the logging daemon to send log output to a central log server or accept log output as a central log server. Use of the systemd journal subsystem is covered. Also, awareness of syslog and syslog-ng as alternative logging systems is included.

Key Knowledge Areas:

◈ Basic configuration of rsyslog.
◈ Understanding of standard facilities, priorities and actions.
◈ Query the systemd journal.
◈ Filter systemd journal data by criteria such as date, service or priority.
◈ Configure persistent systemd journal storage and journal size.
◈ Delete old systemd journal data.
◈ Retrieve systemd journal data from a rescue system or file system copy.
◈ Understand interaction of rsyslog with systemd-journald.
◈ Configuration of logrotate.
◈ Awareness of syslog and syslog-ng.

Terms and Utilities:

◈ /etc/rsyslog.conf
◈ /var/log/
◈ logger
◈ logrotate
◈ /etc/logrotate.conf
◈ /etc/logrotate.d/
◈ journalctl
◈ systemd-cat
◈ /etc/systemd/journald.conf
◈ /var/log/journal/

108.3 Mail Transfer Agent (MTA) basics

Weight: 3

Description: Candidates should be aware of the commonly available MTA programs and be able to perform basic forward and alias configuration on a client host. Other configuration files are not covered.

Key Knowledge Areas:

◈ Create e-mail aliases.
◈ Configure e-mail forwarding.
◈ Knowledge of commonly available MTA programs (postfix, sendmail, exim) (no configuration).

Terms and Utilities:

◈ ~/.forward
◈ sendmail emulation layer commands
◈ newaliases
◈ mail
◈ mailq
◈ postfix
◈ sendmail
◈ exim

108.4 Manage printers and printing

Weight: 2

Description: Candidates should be able to manage print queues and user print jobs using CUPS and the LPD compatibility interface.

Key Knowledge Areas:

◈ Basic CUPS configuration (for local and remote printers).
◈ Manage user print queues.
◈ Troubleshoot general printing problems.
◈ Add and remove jobs from configured printer queues.

The following is a partial list of the used files, terms and utilities:


◈ CUPS configuration files, tools and utilities
◈ /etc/cups/
◈ lpd legacy interface (lpr, lprm, lpq)

Topic 109: Networking Fundamentals


109.1 Fundamentals of internet protocols

Weight: 4

Description: Candidates should demonstrate a proper understanding of TCP/IP network fundamentals.

Key Knowledge Areas:

◈ Demonstrate an understanding of network masks and CIDR notation.
◈ Knowledge of the differences between private and public "dotted quad" IP addresses.
◈ Knowledge about common TCP and UDP ports and services (20, 21, 22, 23, 25, 53, 80, 110, 123, 139, 143, 161, 162, 389, 443, 465, 514, 636, 993, 995).
◈ Knowledge about the differences and major features of UDP, TCP and ICMP.
◈ Knowledge of the major differences between IPv4 and IPv6.
◈ Knowledge of the basic features of IPv6.

The following is a partial list of the used files, terms and utilities:

◈ /etc/services
◈ IPv4, IPv6
◈ Subnetting
◈ TCP, UDP, ICMP

109.2 Persistent network configuration

Weight: 4

Description: Candidates should be able to manage the persistent network configuration of a Linux host.

Key Knowledge Areas:

◈ Understand basic TCP/IP host configuration.
◈ Configure ethernet and wi-fi network configuration using NetworkManager.
◈ Awareness of systemd-networkd.

The following is a partial list of the used files, terms and utilities:

◈ /etc/hostname
◈ /etc/hosts
◈ /etc/nsswitch.conf
◈ /etc/resolv.conf
◈ nmcli
◈ hostnamectl
◈ ifup
◈ ifdown

109.3 Basic network troubleshooting

Weight: 4

Description: Candidates should be able to troubleshoot networking issues on client hosts.

Key Knowledge Areas:

◈ Manually configure network interfaces, including viewing and changing the configuration of network interfaces using iproute2.
◈ Manually configure routing, including viewing and changing routing tables and setting the default route using iproute2.
◈ Debug problems associated with the network configuration.
◈ Awareness of legacy net-tools commands.

The following is a partial list of the used files, terms and utilities:

◈ ip
◈ hostname
◈ ss
◈ ping
◈ ping6
◈ traceroute
◈ traceroute6
◈ tracepath
◈ tracepath6
◈ netcat
◈ ifconfig
◈ netstat
◈ route

109.4 Configure client side DNS

Weight: 2

Description: Candidates should be able to configure DNS on a client host.

Key Knowledge Areas:

◈ Query remote DNS servers.
◈ Configure local name resolution and use remote DNS servers.
◈ Modify the order in which name resolution is done.
◈ Debug errors related to name resolution.
◈ Awareness of systemd-resolved.

The following is a partial list of the used files, terms and utilities:

◈ /etc/hosts
◈ /etc/resolv.conf
◈ /etc/nsswitch.conf
◈ host
◈ dig
◈ getent

Topic 110: Security

110.1 Perform security administration tasks

Weight: 3

Description: Candidates should know how to review system configuration to ensure host security in accordance with local security policies.

Key Knowledge Areas:

◈ Audit a system to find files with the suid/sgid bit set.
◈ Set or change user passwords and password aging information.
◈ Being able to use nmap and netstat to discover open ports on a system.
◈ Set up limits on user logins, processes and memory usage.
◈ Determine which users have logged in to the system or are currently logged in.
◈ Basic sudo configuration and usage.

The following is a partial list of the used files, terms and utilities:

◈ find
◈ passwd
◈ fuser
◈ lsof
◈ nmap
◈ chage
◈ netstat
◈ sudo
◈ /etc/sudoers
◈ su
◈ usermod
◈ ulimit
◈ who, w, last

110.2 Setup host security

Weight: 3

Description: Candidates should know how to set up a basic level of host security.

Key Knowledge Areas:

◈ Awareness of shadow passwords and how they work.
◈ Turn off network services not in use.
◈ Understand the role of TCP wrappers.

The following is a partial list of the used files, terms and utilities:

◈ /etc/nologin
◈ /etc/passwd
◈ /etc/shadow
◈ /etc/xinetd.d/
◈ /etc/xinetd.conf
◈ systemd.socket
◈ /etc/inittab
◈ /etc/init.d/
◈ /etc/hosts.allow
◈ /etc/hosts.deny

110.3 Securing data with encryption

Weight: 4

Description: The candidate should be able to use public key techniques to secure data and communication.

Key Knowledge Areas:

◈ Perform basic OpenSSH 2 client configuration and usage.
◈ Understand the role of OpenSSH 2 server host keys.
◈ Perform basic GnuPG configuration, usage and revocation.
◈ Use GPG to encrypt, decrypt, sign and verify files.
◈ Understand SSH port tunnels (including X11 tunnels).
◈ The following is a partial list of the used files, terms and utilities:

◈ ssh
◈ ssh-keygen
◈ ssh-agent
◈ ssh-add
◈ ~/.ssh/id_rsa and id_rsa.pub
◈ ~/.ssh/id_dsa and id_dsa.pub
◈ ~/.ssh/id_ecdsa and id_ecdsa.pub
◈ ~/.ssh/id_ed25519 and id_ed25519.pub
◈ /etc/ssh/ssh_host_rsa_key and ssh_host_rsa_key.pub
◈ /etc/ssh/ssh_host_dsa_key and ssh_host_dsa_key.pub
◈ /etc/ssh/ssh_host_ecdsa_key and ssh_host_ecdsa_key.pub
◈ /etc/ssh/ssh_host_ed25519_key and ssh_host_ed25519_key.pub
◈ ~/.ssh/authorized_keys
◈ ssh_known_hosts
◈ gpg
◈ gpg-agent
◈ ~/.gnupg/

Future Change Considerations


Future changes to the objective will/may include:

◈ Remove ifup/ifdown and legacy net-tools command
◈ Remove TCP wrappers

Wednesday, 7 August 2019

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

LPIC-1 Certifications, LPIC-1: System Administrator, LPI Guides

The world’s largest and most recognized Linux Certification


LPIC-1 is the first certification in LPI’s multi-level Linux professional certification program. The LPIC-1 will validate the candidate's ability to perform maintenance tasks on the command line, install and configure a computer running Linux and configure basic networking.

The LPIC-1 is designed to reflect current research and validate a candidate's proficiency in real world system administration. The objectives are tied to real-world job skills, which we determine through job task analysis surveying during exam development.

Current Version: 5.0 (Exam codes 101-500)

Objectives: 101-500

Prerequisites: There are no prerequisites for this certification

Requirements: Passing exams 101

Validity Period: 5 years

Languages: English, German, Japanese, Portuguese, Chinese (Simplified) and Chinese (Traditional). Exams in following languages will be released in 2019: Italian, Spanish, French.



To become LPIC-1 certified the candidate must be able to:

◈ understand the architecture of a Linux system;
◈ install and maintain a Linux workstation, including X11 and setup it up as a network client;
◈ work at the Linux command line, including common GNU and Unix commands;
◈ handle files and access permissions as well as system security; and
◈ perform easy maintenance tasks: help users, add users to a larger system, backup and restore, shutdown and reboot.

LPIC-1 Certifications, LPIC-1: System Administrator, LPI Guides

LPIC-1 Exam 101


Exam Objectives Version: Version 5.0

Exam Codes: 101-500

About Objective Weights: Each objective is assigned a weighting value. The weights indicate the relative importance of each objective on the exam. Objectives with higher weights will be covered in the exam with more questions.

Topic 101: System Architecture


101.1 Determine and configure hardware settings

Weight: 2

Description: Candidates should be able to determine and configure fundamental system hardware.

Key Knowledge Areas:

◈ Enable and disable integrated peripherals.
◈ Differentiate between the various types of mass storage devices.
◈ Determine hardware resources for devices.
◈ Tools and utilities to list various hardware information (e.g. lsusb, lspci, etc.).
◈ Tools and utilities to manipulate USB devices.
◈ Conceptual understanding of sysfs, udev and dbus.

The following is a partial list of the used files, terms and utilities:

◈ /sys/
◈ /proc/
◈ /dev/
◈ modprobe
◈ lsmod
◈ lspci
◈ lsusb

101.2 Boot the system

Weight: 3

Description: Candidates should be able to guide the system through the booting process.

Key Knowledge Areas:

◈ Provide common commands to the boot loader and options to the kernel at boot time
◈ Demonstrate knowledge of the boot sequence from BIOS to boot completion
◈ Understanding of SysVinit and systemd
◈ Awareness of Upstart
◈ Check boot events in the log files

Terms and Utilities:

◈ dmesg
◈ BIOS
◈ bootloader
◈ kernel
◈ initramfs
◈ init
◈ SysVinit
◈ systemd

101.3 Change runlevels / boot targets and shutdown or reboot system

Weight: 3

Description: Candidates should be able to manage the SysVinit runlevel or systemd boot target of the system. This objective includes changing to single user mode, shutdown or rebooting the system. Candidates should be able to alert users before switching runlevels / boot targets and properly terminate processes. This objective also includes setting the default SysVinit runlevel or systemd boot target. It also includes awareness of Upstart as an alternative to SysVinit or systemd.

Key Knowledge Areas:

◈ Set the default runlevel or boot target
◈ Change between runlevels / boot targets including single user mode
◈ Shutdown and reboot from the command line
◈ Alert users before switching runlevels / boot targets or other major system events
◈ Properly terminate processes
◈ Awareness of acpid.

Terms and Utilities:

◈ /etc/inittab
◈ shutdown
◈ init
◈ /etc/init.d/
◈ telinit
◈ systemd
◈ systemctl
◈ /etc/systemd/
◈ /usr/lib/systemd/
◈ wall

Topic 102: Linux Installation and Package Management


102.1 Design hard disk layout

Weight: 2

Description: Candidates should be able to design a disk partitioning scheme for a Linux system.

Key Knowledge Areas:

◈ Allocate filesystems and swap space to separate partitions or disks
◈ Tailor the design to the intended use of the system
◈ Ensure the /boot partition conforms to the hardware architecture requirements for booting
◈ Knowledge of basic features of LVM

Terms and Utilities:

◈ / (root) filesystem
◈ /var filesystem
◈ /home filesystem
◈ /boot filesystem
◈ swap space
◈ mount points
◈ partitions

102.2 Install a boot manager

Weight: 2

Description: Candidates should be able to select, install and configure a boot manager.

Key Knowledge Areas:

◈ Providing alternative boot locations and backup boot options
◈ Install and configure a boot loader such as GRUB Legacy
◈ Perform basic configuration changes for GRUB 2
◈ Interact with the boot loader

The following is a partial list of the used files, terms and utilities:

◈ menu.lst, grub.cfg and grub.conf
◈ grub-install
◈ grub-mkconfig
◈ MBR

102.3 Manage shared libraries

Weight: 1

Description: Candidates should be able to determine the shared libraries that executable programs depend on and install them when necessary.

Key Knowledge Areas:

◈ Identify shared libraries
◈ Identify the typical locations of system libraries
◈ Load shared libraries

Terms and Utilities:

◈ ldd
◈ ldconfig
◈ /etc/ld.so.conf
◈ LD_LIBRARY_PATH

102.4 Use Debian package management

Weight: 3

Description: Candidates should be able to perform package management using the Debian package tools.

Key Knowledge Areas:

◈ Install, upgrade and uninstall Debian binary packages
◈ Find packages containing specific files or libraries which may or may not be installed
◈ Obtain package information like version, content, dependencies, package integrity and installation status (whether or not the package is installed)
◈ Awareness of apt.

Terms and Utilities:

◈ /etc/apt/sources.list
◈ dpkg
◈ dpkg-reconfigure
◈ apt-get
◈ apt-cache

102.5 Use RPM and YUM package management

Weight: 3

Description: Candidates should be able to perform package management using RPM and YUM tools.

Key Knowledge Areas:

◈ Install, re-install, upgrade and remove packages using RPM and YUM
◈ Obtain information on RPM packages such as version, status, dependencies, integrity and signatures
◈ Determine what files a package provides, as well as find which package a specific file comes from
◈ Awareness of dnf.

Terms and Utilities:

◈ rpm
◈ rpm2cpio
◈ /etc/yum.conf
◈ /etc/yum.repos.d/
◈ yum
◈ yumdownloader

102.6 Linux as a virtualization guest

Weight: 1

Description: Candidates should understand the implications of virtualization and cloud computing on a Linux guest system.

Key Knowledge Areas:

◈ Understand the general concept of virtual machines and containers.
◈ Understand common elements virtual machines in an IaaS cloud, such as computing instances, block storage and networking.
◈ Understand unique properties of a Linux system which have to changed when a system is cloned or used as a template.
◈ Understand how system images are used to deploy virtual machines, cloud instances and containers.
◈ Understand Linux extensions which integrate Linux with a virtualization product.
◈ Awareness of cloud-init.

Terms and Utilities:

◈ Virtual machine
◈ Linux container
◈ Application container
◈ Guest drivers
◈ SSH host keys
◈ D-Bus machine id

Topic 103: GNU and Unix Commands


103.1 Work on the command line

Weight: 4

Description: Candidates should be able to interact with shells and commands using the command line. The objective assumes the Bash shell.

Key Knowledge Areas:

◈ Use single shell commands and one line command sequences to perform basic tasks on the command line
◈ Use and modify the shell environment including defining, referencing and exporting environment variables
◈ Use and edit command history
◈ Invoke commands inside and outside the defined path

Terms and Utilities:

◈ bash
◈ echo
◈ env
◈ export
◈ pwd
◈ set
◈ unset
◈ type
◈ which
◈ man
◈ uname
◈ history
◈ .bash_history
◈ Quoting

103.2 Process text streams using filters

Weight: 2

Description: Candidates should should be able to apply filters to text streams.

Key Knowledge Areas:

◈ Send text files and output streams through text utility filters to modify the output using standard UNIX commands found in the GNU textutils package.

Terms and Utilities:

◈ bzcat
◈ cat
◈ cut
◈ head
◈ less
◈ md5sum
◈ nl
◈ od
◈ paste
◈ sed
◈ sha256sum
◈ sha512sum
◈ sort
◈ split
◈ tail
◈ tr
◈ uniq
◈ wc
◈ xzcat
◈ zcat

103.3 Perform basic file management

Weight: 4

Description: Candidates should be able to use the basic Linux commands to manage files and directories.

Key Knowledge Areas:

◈ Copy, move and remove files and directories individually
◈ Copy multiple files and directories recursively
◈ Remove files and directories recursively
◈ Use simple and advanced wildcard specifications in commands
◈ Using find to locate and act on files based on type, size, or time
◈ Usage of tar, cpio and dd

Terms and Utilities:

◈ cp
◈ find
◈ mkdir
◈ mv
◈ ls
◈ rm
◈ rmdir
◈ touch
◈ tar
◈ cpio
◈ dd
◈ file
◈ gzip
◈ gunzip
◈ bzip2
◈ xz
◈ file globbing

103.4 Use streams, pipes and redirects

Weight: 4

Description: Candidates should be able to redirect streams and connect them in order to efficiently process textual data. Tasks include redirecting standard input, standard output and standard error, piping the output of one command to the input of another command, using the output of one command as arguments to another command and sending output to both stdout and a file.

Key Knowledge Areas:

◈ Redirecting standard input, standard output and standard error
◈ Pipe the output of one command to the input of another command
◈ Use the output of one command as arguments to another command
◈ Send output to both stdout and a file

Terms and Utilities:

◈ tee
◈ xargs

103.5 Create, monitor and kill processes

Weight: 4

Description: Candidates should be able to perform basic process management.

Key Knowledge Areas:

◈ Run jobs in the foreground and background
◈ Signal a program to continue running after logout
◈ Monitor active processes
◈ Select and sort processes for display
◈ Send signals to processes

Terms and Utilities:

◈ &
◈ bg
◈ fg
◈ jobs
◈ kill
◈ nohup
◈ ps
◈ top
◈ free
◈ uptime
◈ pgrep
◈ pkill
◈ killall
◈ screen
◈ tmux

103.6 Modify process execution priorities

Weight: 2

Description: Candidates should should be able to manage process execution priorities.

Key Knowledge Areas:

◈ Know the default priority of a job that is created
◈ Run a program with higher or lower priority than the default
◈ Change the priority of a running process

Terms and Utilities:

◈ nice
◈ ps
◈ renice
◈ top

103.7 Search text files using regular expressions

Weight: 3

Description: Candidates should be able to manipulate files and text data using regular expressions. This objective includes creating simple regular expressions containing several notational elements as well as understanding the differences between basic and extended regular expressions. It also includes using regular expression tools to perform searches through a filesystem or file content.

Key Knowledge Areas:

◈ Create simple regular expressions containing several notational elements.
◈ Understand the differences between basic and extended regular expressions.
◈ Understand the concepts of special characters, character classes, quantifiers and anchors.
◈ Use regular expression tools to perform searches through a filesystem or file content.
◈ Use regular expressions to delete, change and substitute text.

Terms and Utilities:

◈ grep
◈ egrep
◈ fgrep
◈ sed
◈ regex(7)

103.8 Basic file editing

Weight: 3

Description: Candidates should be able to edit text files using vi. This objective includes vi navigation, vi modes, inserting, editing, deleting, copying and finding text. It also includes awareness of other common editors and setting the default editor.

Key Knowledge Areas:

◈ Navigate a document using vi.
◈ Understand and use vi modes.
◈ Insert, edit, delete, copy and find text in vi.
◈ Awareness of Emacs, nano and vim.
◈ Configure the standard editor.

Terms and Utilities:

◈ vi
◈ /, ?
◈ h,j,k,l
◈ i, o, a
◈ c, d, p, y, dd, yy
◈ ZZ, :w!, :q!, :e!
◈ EDITOR

Topic 104: Devices, Linux Filesystems, Filesystem Hierarchy Standard


104.1 Create partitions and filesystems

Weight: 2

Description: Candidates should be able to configure disk partitions and then create filesystems on media such as hard disks. This includes the handling of swap partitions.

Key Knowledge Areas:

◈ Manage MBR and GPT partition tables
◈ Use various mkfs commands to create various filesystems such as:
     ◈ ext2/ext3/ext4
     ◈ XFS
     ◈ VFAT
     ◈ exFAT

◈ Basic feature knowledge of Btrfs, including multi-device filesystems, compression and subvolumes.

The following is a partial list of the used files, terms and utilities:


◈ fdisk
◈ gdisk
◈ parted
◈ mkfs
◈ mkswap

104.2 Maintain the integrity of filesystems

Weight: 2

Description: Candidates should be able to maintain a standard filesystem, as well as the extra data associated with a journaling filesystem.

Key Knowledge Areas:

◈ Verify the integrity of filesystems
◈ Monitor free space and inodes
◈ Repair simple filesystem problems

Terms and Utilities:

◈ du
◈ df
◈ fsck
◈ e2fsck
◈ mke2fs
◈ tune2fs
◈ xfs_repair
◈ xfs_fsr
◈ xfs_db

104.3 Control mounting and unmounting of filesystems

Weight: 3

Description: Candidates should be able to configure the mounting of a filesystem.

Key Knowledge Areas:

◈ Manually mount and unmount filesystems
◈ Configure filesystem mounting on bootup
◈ Configure user mountable removable filesystems
◈ Use of labels and UUIDs for identifying and mounting file systems.
◈ Awareness of systemd mount units.

Terms and Utilities:

◈ /etc/fstab
◈ /media/
◈ mount
◈ umount
◈ blkid
◈ lsblk

104.4 Removed

104.5 Manage file permissions and ownership

Weight: 3

Description: Candidates should be able to control file access through the proper use of permissions and ownerships.

Key Knowledge Areas:

◈ Manage access permissions on regular and special files as well as directories
◈ Use access modes such as suid, sgid and the sticky bit to maintain security
◈ Know how to change the file creation mask
◈ Use the group field to grant file access to group members

Terms and Utilities:

◈ chmod
◈ umask
◈ chown
◈ chgrp

104.6 Create and change hard and symbolic links

Weight: 2

Description: Candidates should be able to create and manage hard and symbolic links to a file.

Key Knowledge Areas:

◈ Create links
◈ Identify hard and/or soft links
◈ Copying versus linking files
◈ Use links to support system administration tasks

Terms and Utilities:

◈ ln
◈ ls

104.7 Find system files and place files in the correct location

Weight: 2

Description: Candidates should be thoroughly familiar with the Filesystem Hierarchy Standard (FHS), including typical file locations and directory classifications.

Key Knowledge Areas:

◈ Understand the correct locations of files under the FHS
◈ Find files and commands on a Linux system
◈ Know the location and purpose of important file and directories as defined in the FHS

Terms and Utilities:

◈ find
◈ locate
◈ updatedb
◈ whereis
◈ which
◈ type
◈ /etc/updatedb.conf

Saturday, 3 August 2019

Setting Linux Permissions with chmod

The basics of security within the file system must begin with setting Linux Permissions at the command line using the tool chmod. In this article we show the use of the tool but very often, you will want to list the permissions directory after. We will show you how setting permissions at the cli will also allow you to list them once set.

LPI Linux, LPI Tutorial and Material, LPI Study Materials, LPI Online Exam, LPI Guides

Linux file permissions make up the very basics of any security model and is known as the file mode. Hence the command chmod or change mode is used in setting these permissions. The file mode is stored within the file’s inode or metadata. The magic number being 3 within the mode, we have 3 modes that can be applied to 3 objects. Included as part of the file mode, but separate from the permission, is identifying the file type, (regular file, directory, link etc).

Permissions:


◈ Read
◈ Write
◈ Execute

Objects:


◈ User
◈ Group
◈ Others

File Types


◈ Regular files
◈ Directories
◈ Links
◈ Sockets
◈ Pipes
◈ Block devices
◈ Character devices

To list the permissions in Linux we can use the command ls or the command stat.

$ ls -l /etc/hosts
-rw-r--r-- 1 root root 228 Aug 22  2018 /etc/hosts

This standard file in any Linux distribution becomes an easy way to see the permissions. We can also use stat

$ stat -c %A /etc/hosts
-rw-r--r--

A great tool to isolate just the mode or permissions in Linux. If we one the file, being listed as the user owner of the file, we can use the tool chmod as a method of setting  permissions. Firstly we will move to our home directory and then create a new empty file using touch before setting permissions:

$ cd
$ touch new_file
$ chmod u+x
$ stat -c %A new_file
-rwxrw-r--

It is common that after setting permissions we would want to list them to see that we have gained what we though we were setting; howler this can be done directory from chmod. We will work with that same file but add execute also for the group:

$ chmod -v g+x new_file
mode of 'new_file' changed from 0764 (rwxrw-r--) to 0774 (rwxrwxr--)

By including the -v (verbose) opting with chmod we are able to print the permissions and what they were changed from directly after setting Linux file permissions.

Thursday, 1 August 2019

102-500: LPI Linux Administrator - 102 Exam Topics

102-500 Online Exam,  LPI Linux Administrator, LPIC-1 Certifications, LPIC-1 Study Materials

Exam Objectives Version: Version 5.0

Exam Code: 102-500

About Objective Weights: Each objective is assigned a weighting value. The weights indicate the relative importance of each objective on the exam. Objectives with higher weights will be covered in the exam with more questions.

102 - Exam Topics


Topic Details 
Topic 105: Shells and Shell Scripting
105.1 Customize and use the shell environment Weight: 4
Description: Candidates should be able to customize shell environments to meet users' needs. Candidates should be able to modify global and user profiles.
Key Knowledge Areas:
- Set environment variables (e.g. PATH) at login or when spawning a new shell.
- Write Bash functions for frequently used sequences of commands.
- Maintain skeleton directories for new user accounts.
- Set command search path with the proper directory.
The following is a partial list of the used files, terms and utilities:
- .
- source
- /etc/bash.bashrc
- /etc/profile
- env
- export
- set
- unset
- ~/.bash_profile
- ~/.bash_login
- ~/.profile
- ~/.bashrc
- ~/.bash_logout
- function
- alias
105.2 Customize or write simple scripts Weight: 4
Description: Candidates should be able to customize existing scripts, or write simple new Bash scripts.
Key Knowledge Areas:
- Use standard sh syntax (loops, tests).
- Use command substitution.
- Test return values for success or failure or other information provided by a command.
- Execute chained commands.
- Perform conditional mailing to the superuser.
- Correctly select the script interpreter through the shebang (#!) line.
- Manage the location, ownership, execution and suid-rights of scripts.
The following is a partial list of the used files, terms and utilities:
- for
- while
- test
- if
- read
- seq
- exec
- ||
- &&
Topic 106: User Interfaces and Desktops
106.1 Install and configure X11 Weight: 2
Description: Candidates should be able to install and configure X11.
Key Knowledge Areas:
- Understanding of the X11 architecture.
- Basic understanding and knowledge of the X Window configuration file.
- Overwrite specific aspects of Xorg configuration, such as keyboard layout.
- Understand the components of desktop environments, such as display managers and window managers.
- Manage access to the X server and display applications on remote X servers.
- Awareness of Wayland.
The following is a partial list of the used files, terms and utilities:
- /etc/X11/xorg.conf
- /etc/X11/xorg.conf.d/
- ~/.xsession-errors
- xhost
- xauth
- DISPLAY
- X
106.2 Graphical Desktops Weight: 1
Description: Candidates should be aware of major Linux desktops. Furthermore, candidates should be aware of protocols used to access remote desktop sessions.

Key Knowledge Areas:
- Awareness of major desktop environments
- Awareness of protocols to access remote desktop sessions
The following is a partial list of the used files, terms and utilities:
- KDE
- Gnome
- Xfce
- X11
- XDMCP
- VNC
- Spice
- RDP
106.3 Accessibility Weight: 1
Description: Demonstrate knowledge and awareness of accessibility technologies.
Key Knowledge Areas:
- Basic knowledge of visual settings and themes.
- Basic knowledge of assistive technology.
The following is a partial list of the used files, terms and utilities:
- High Contrast/Large Print Desktop Themes.
- Screen Reader.
- Braille Display.
- Screen Magnifier.
- On-Screen Keyboard.
- Sticky/Repeat keys.
- Slow/Bounce/Toggle keys.
- Mouse keys.
- Gestures.
- Voice recognition.
Topic 107: Administrative Tasks
107.1 Manage user and group accounts and related system files Weight: 5
Description: Candidates should be able to add, remove, suspend and change user accounts.
Key Knowledge Areas:
- Add, modify and remove users and groups.
- Manage user/group info in password/group databases.
- Create and manage special purpose and limited accounts.
The following is a partial list of the used files, terms and utilities:
- /etc/passwd
- /etc/shadow
- /etc/group
- /etc/skel/
- chage
- getent
- groupadd
- groupdel
- groupmod
- passwd
- useradd
- userdel
- usermod
107.2 Automate system administration tasks by scheduling jobs Weight: 4
Description: Candidates should be able to use cron and systemd timers to run jobs at regular intervals and to use at to run jobs at a specific time.
Key Knowledge Areas:
- Manage cron and at jobs.
- Configure user access to cron and at services.
- Understand systemd timer units.
The following is a partial list of the used files, terms and utilities:
- /etc/cron.{d,daily,hourly,monthly,weekly}/
- /etc/at.deny
- /etc/at.allow
- /etc/crontab
- /etc/cron.allow
- /etc/cron.deny
- /var/spool/cron/
- crontab
- at
- atq
- atrm
- systemctl
- systemd-run
107.3 Localisation and internationalisation Weight: 3
Description: Candidates should be able to localize a system in a different language than English. As well, an understanding of why LANG=C is useful when scripting.
Key Knowledge Areas:
- Configure locale settings and environment variables.
- Configure timezone settings and environment variables.
The following is a partial list of the used files, terms and utilities:
- /etc/timezone
- /etc/localtime
- /usr/share/zoneinfo/
- LC_*
- LC_ALL
- LANG
- TZ
- /usr/bin/locale
- tzselect
- timedatectl
- date
- iconv
- UTF-8
- ISO-8859
- ASCII
- Unicode
 Topic 108: Essential System Services
108.1 Maintain system time Weight: 3
Description: Candidates should be able to properly maintain the system time and synchronize the clock via NTP.
Key Knowledge Areas:
- Set the system date and time.
- Set the hardware clock to the correct time in UTC.
- Configure the correct timezone.
- Basic NTP configuration using ntpd and chrony.
- Knowledge of using the pool.ntp.org service.
- Awareness of the ntpq command.
The following is a partial list of the used files, terms and utilities:
- /usr/share/zoneinfo/
- /etc/timezone
- /etc/localtime
- /etc/ntp.conf
- /etc/chrony.conf
- date
- hwclock
- timedatectl
- ntpd
- ntpdate
- chronyc
- pool.ntp.org
108.2 System logging Weight: 4
Description: Candidates should be able to configure rsyslog. This objective also includes configuring the logging daemon to send log output to a central log server or accept log output as a central log server. Use of the systemd journal subsystem is covered. Also, awareness of syslog and syslog-ng as alternative logging systems is included.
Key Knowledge Areas:
- Basic configuration of rsyslog.
- Understanding of standard facilities, priorities and actions.
- Query the systemd journal.
- Filter systemd journal data by criteria such as date, service or priority.
- Configure persistent systemd journal storage and journal size.
- Delete old systemd journal data.
- Retrieve systemd journal data from a rescue system or file system copy.
- Understand interaction of rsyslog with systemd-journald.
- Configuration of logrotate.
- Awareness of syslog and syslog-ng.
Terms and Utilities:
- /etc/rsyslog.conf
- /var/log/
- logger
- logrotate
- /etc/logrotate.conf
- /etc/logrotate.d/
- journalctl
- systemd-cat
- /etc/systemd/journald.conf
- /var/log/journal/
108.3 Mail Transfer Agent (MTA) basics Weight: 3
Description: Candidates should be aware of the commonly available MTA programs and be able to perform basic forward and alias configuration on a client host. Other configuration files are not covered.
Key Knowledge Areas:
- Create e-mail aliases.
- Configure e-mail forwarding.
- Knowledge of commonly available MTA programs (postfix, sendmail, exim) (no configuration).
Terms and Utilities:
- ~/.forward
- sendmail emulation layer commands
- newaliases
- mail
- mailq
- postfix
- sendmail
- exim
108.4 Manage printers and printing Weight: 2
Description: Candidates should be able to manage print queues and user print jobs using CUPS and the LPD compatibility interface.
Key Knowledge Areas:
- Basic CUPS configuration (for local and remote printers).
- Manage user print queues.
- Troubleshoot general printing problems.
- Add and remove jobs from configured printer queues.
The following is a partial list of the used files, terms and utilities:
- CUPS configuration files, tools and utilities
- /etc/cups/
- lpd legacy interface (lpr, lprm, lpq)
Topic 109: Networking Fundamentals
109.1 Fundamentals of internet protocols  Weight: 4
Description: Candidates should demonstrate a proper understanding of TCP/IP network fundamentals.
Key Knowledge Areas:
- Demonstrate an understanding of network masks and CIDR notation.
- Knowledge of the differences between private and public "dotted quad" IP addresses.
- Knowledge about common TCP and UDP ports and services (20, 21, 22, 23, 25, 53, 80, 110, 123, 139, 143, 161, 162, 389, 443, 465, 514, 636, 993, 995).
- Knowledge about the differences and major features of UDP, TCP and ICMP.
- Knowledge of the major differences between IPv4 and IPv6.
- Knowledge of the basic features of IPv6.
The following is a partial list of the used files, terms and utilities:
- /etc/services
- IPv4, IPv6
- Subnetting
- TCP, UDP, ICMP
109.2 Persistent network configuration Weight: 4
Description: Candidates should be able to manage the persistent network configuration of a Linux host.
Key Knowledge Areas:
- Understand basic TCP/IP host configuration.
- Configure ethernet and wi-fi network configuration using NetworkManager.
- Awareness of systemd-networkd.
The following is a partial list of the used files, terms and utilities:
- /etc/hostname
- /etc/hosts
- /etc/nsswitch.conf
- /etc/resolv.conf
- nmcli
- hostnamectl
- ifup
- ifdown
109.3 Basic network troubleshooting Weight: 4
Description: Candidates should be able to troubleshoot networking issues on client hosts.
Key Knowledge Areas:
- Manually configure network interfaces, including viewing and changing the configuration of network interfaces using iproute2.
- Manually configure routing, including viewing and changing routing tables and setting the default route using iproute2.
- Debug problems associated with the network configuration.
- Awareness of legacy net-tools commands.
The following is a partial list of the used files, terms and utilities:
- ip
- hostname
- ss
- ping
- ping6
- traceroute
- traceroute6
- tracepath
- tracepath6
- netcat
- ifconfig
- netstat
- route
109.4 Configure client side DNS Weight: 2
Description: Candidates should be able to configure DNS on a client host.
Key Knowledge Areas:
- Query remote DNS servers.
- Configure local name resolution and use remote DNS servers.
- Modify the order in which name resolution is done.
- Debug errors related to name resolution.
- Awareness of systemd-resolved.
The following is a partial list of the used files, terms and utilities:
- /etc/hosts
- /etc/resolv.conf
- /etc/nsswitch.conf
- host
- dig
- getent
Topic 110: Security
110.1 Perform security administration tasks  Weight: 3
Description: Candidates should know how to review system configuration to ensure host security in accordance with local security policies.
Key Knowledge Areas:
- Audit a system to find files with the suid/sgid bit set.
- Set or change user passwords and password aging information.
- Being able to use nmap and netstat to discover open ports on a system.
- Set up limits on user logins, processes and memory usage.
- Determine which users have logged in to the system or are currently logged in.
- Basic sudo configuration and usage.
The following is a partial list of the used files, terms and utilities:
- find
- passwd
- fuser
- lsof
- nmap
- chage
- netstat
- sudo
-/etc/sudoers
- su
- usermod
- ulimit
- who, w, last
110.2 Setup host security Weight: 3
Description: Candidates should know how to set up a basic level of host security.
Key Knowledge Areas:
- Awareness of shadow passwords and how they work.
- Turn off network services not in use.
- Understand the role of TCP wrappers.
The following is a partial list of the used files, terms and utilities:
- /etc/nologin
- /etc/passwd
- /etc/shadow
- /etc/xinetd.d/
- /etc/xinetd.conf
- systemd.socket
- /etc/inittab
- /etc/init.d/
- /etc/hosts.allow
- /etc/hosts.deny
110.3 Securing data with encryption Weight: 4
Description: The candidate should be able to use public key techniques to secure data and communication.
Key Knowledge Areas:
- Perform basic OpenSSH 2 client configuration and usage.
- Understand the role of OpenSSH 2 server host keys.
- Perform basic GnuPG configuration, usage and revocation.
- Use GPG to encrypt, decrypt, sign and verify files.
- Understand SSH port tunnels (including X11 tunnels).
The following is a partial list of the used files, terms and utilities:
- ssh
- ssh-keygen
- ssh-agent
- ssh-add
- ~/.ssh/id_rsa and id_rsa.pub
- ~/.ssh/id_dsa and id_dsa.pub
- ~/.ssh/id_ecdsa and id_ecdsa.pub
- ~/.ssh/id_ed25519 and id_ed25519.pub
- /etc/ssh/ssh_host_rsa_key and ssh_host_rsa_key.pub
- /etc/ssh/ssh_host_dsa_key and ssh_host_dsa_key.pub
- /etc/ssh/ssh_host_ecdsa_key and ssh_host_ecdsa_key.pub
- /etc/ssh/ssh_host_ed25519_key and ssh_host_ed25519_key.pub
- ~/.ssh/authorized_keys
- ssh_known_hosts
- gpg
- gpg-agent
- ~/.gnupg/

Tuesday, 30 July 2019

cut command in Linux with examples

Linux Certifications, Linux Online Exam, Linux Study Materials, LPI Tutorials and Materials

The cut command in UNIX is a command for cutting out the sections from each line of files and writing the result to standard output. It can be used to cut parts of a line by byte position, character and field. Basically the cut command slices a line and extracts the text. It is necessary to specify option with command otherwise it gives error. If more than one file name is provided then data from each file is not precedes by its file name.

Syntax:


cut OPTION... [FILE]...

Let us consider two files having name state.txt and capital.txt contains 5 names of the Indian states and capitals respectively.

$ cat state.txt
Andhra Pradesh
Arunachal Pradesh
Assam
Bihar
Chhattisgarh

Without any option specified it displays error.

$ cut state.txt
cut: you must specify a list of bytes, characters, or fields
Try 'cut --help' for more information.

Options and their Description with examples:


1. -b(byte): To extract the specific bytes, you need to follow -b option with the list of byte numbers separated by comma. Range of bytes can also be specified using the hyphen(-). It is necessary to specify list of byte numbers otherwise it gives error. Tabs and backspaces are treated like as a character of 1 byte.

List without ranges
$ cut -b 1,2,3 state.txt
And
Aru
Ass
Bih
Chh

List with ranges
$ cut -b 1-3,5-7 state.txt
Andra
Aruach
Assm
Bihr
Chhtti

It uses a special form for selecting bytes from beginning upto the end of the line:

In this, 1- indicate from 1st byte to end byte of a line
$ cut -b 1- state.txt
Andhra Pradesh
Arunachal Pradesh
Assam
Bihar
Chhattisgarh

In this, -3 indicate from 1st byte to 3rd byte of a line
$ cut -b -3 state.txt
And
Aru
Ass
Bih
Chh

2. -c (column): To cut by character use the -c option. This selects the characters given to the -c option. This can be a list of numbers separated comma or a range of numbers separated by hyphen(-). Tabs and backspaces are treated as a character. It is necessary to specify list of character numbers otherwise it gives error with this option.

Syntax:

$cut -c [(k)-(n)/(k),(n)/(n)] filename

Here,k denotes the starting position of the character and n denotes the ending position of the character in each line, if k and n are separated by “-” otherwise they are only the position of character in each line from the file taken as an input.

$ cut -c 2,5,7 state.txt
nr
rah
sm
ir
hti

Above cut command prints second, fifth and seventh character from each line of the file.

$ cut -c 1-7 state.txt
Andhra
Arunach
Assam
Bihar
Chhatti

Above cut command prints first seven characters of each line from the file.

Cut uses a special form for selecting characters from beginning upto the end of the line:

$ cut -c 1- state.txt
Andhra Pradesh
Arunachal Pradesh
Assam
Bihar
Chhattisgarh

Above command prints starting from first character to end. Here in command only starting
position is specified and the ending position is omitted.

$ cut -c -5 state.txt
Andhr
Aruna
Assam
Bihar
Chhat

Above command prints starting position to the fifth character. Here the starting position
is omitted and the ending position is specified.

3. -f (field): -c option is useful for fixed-length lines. Most unix files doesn’t have fixed-length lines. To extract the useful information you need to cut by fields rather than columns. List of the fields number specified must be separated by comma. Ranges are not described with -f option. cut uses tab as a default field delimiter but can also work with other delimiter by using -d option.

Note: Space is not considered as delimiter in UNIX.

Syntax:

$cut -d "delimiter" -f (field number) file.txt

Like in the file state.txt fields are separated by space if -d option is not used then it prints whole line:

$ cut -f 1 state.txt
Andhra Pradesh
Arunachal Pradesh
Assam
Bihar
Chhattisgarh

If -d option is used then it considered space as a field separator or delimiter:

$ cut -d " " -f 1 state.txt
Andhra
Arunachal
Assam
Bihar
Chhattisgarh

Command prints field from first to fourth of each line from the file.
Command:
$ cut -d " " -f 1-4 state.txt
Output:
Andhra Pradesh
Arunachal Pradesh
Assam
Bihar
Chhattisgarh

4. –complement: As the name suggests it complement the output. This option can be used in the combination with other options either with -f or with -c.

$ cut --complement -d " " -f 1 state.txt
Pradesh
Pradesh
Assam
Bihar
Chhattisgarh

$ cut --complement -c 5 state.txt
Andha Pradesh
Arunchal Pradesh
Assa
Biha
Chhatisgarh

5. –output-delimiter: By default the output delimiter is same as input delimiter that we specify in the cut with -d option. To change the output delimiter use the option –output-delimiter=”delimiter”.

$ cut -d " " -f 1,2 state.txt --output-delimiter='%'
Andhra%Pradesh
Arunachal%Pradesh
Assam
Bihar
Chhattisgarh

Here cut command changes delimiter(%) in the standard output between the fields which is specified by using -f option .

6. –version: This option is used to display the version of cut which is currently running on your system.

$ cut --version
cut (GNU coreutils) 8.26
Packaged by Cygwin (8.26-2)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Applications of cut Command


1. How to use tail with pipes(|): The cut command can be piped with many other commands of the unix. In the following example output of the cat command is given as input to the cut command with -f option to sort the state names coming from file state.txt in the reverse order.

$ cat state.txt | cut -d ' ' -f 1 | sort -r
Chhattisgarh
Bihar
Assam
Arunachal
Andhra

It can also be piped with one or more filters for additional processing. Like in the following example, we are using cat, head and cut command and whose output is stored in the file name list.txt using directive(>).

$ cat state.txt | head -n 3 | cut -d ' ' -f 1 > list.txt

$ cat list.txt
Andhra
Arunachal
Assam

Saturday, 27 July 2019

101-500: LPI Linux Administrator - 101

101-500, LPI Linux Administrator, Linux Study Materials, Linux Certifications

Exam Objectives Version: Version 5.0

Exam Code: 101-500

About Objective Weights: Each objective is assigned a weighting value. The weights indicate the relative importance of each objective on the exam. Objectives with higher weights will be covered in the exam with more questions.

Objective


Topic 101: System Architecture


101.1 Determine and configure hardware settings

Weight: 2

Description: Candidates should be able to determine and configure fundamental system hardware

Key Knowledge Areas:

◈ Enable and disable integrated peripherals.
◈ Differentiate between the various types of mass storage devices.
◈ Determine hardware resources for devices.
◈ Tools and utilities to list various hardware information (e.g. lsusb, lspci, etc.).
◈ Tools and utilities to manipulate USB devices.
◈ Conceptual understanding of sysfs, udev and dbus.

The following is a partial list of the used files, terms and utilities:

◈ /sys/
◈ /proc/
◈ /dev/
◈ modprobe
◈ lsmod
◈ lspci
◈ lsusb

101.2 Boot the system

Weight: 3

Description: Candidates should be able to guide the system through the booting process.

Key Knowledge Areas:

◈ Provide common commands to the boot loader and options to the kernel at boot time.
◈ Demonstrate knowledge of the boot sequence from BIOS/UEFI to boot completion.
◈ Understanding of SysVinit and systemd.
◈ Awareness of Upstart.
◈ Check boot events in the log files.

The following is a partial list of the used files, terms and utilities:

◈ dmesg
◈ journalctl
◈ BIOS
◈ UEFI
◈ bootloader
◈ kernel
◈ initramfs
◈ init
◈ SysVinit
◈ systemd

101.3 Change runlevels / boot targets and shutdown or reboot system

Weight: 3

Description: Candidates should be able to manage the SysVinit runlevel or systemd boot target of the system. This objective includes changing to single user mode, shutdown or rebooting the system. Candidates should be able to alert users before switching runlevels / boot targets and properly terminate processes. This objective also includes setting the default SysVinit runlevel or systemd boot target. It also includes awareness of Upstart as an alternative to SysVinit or systemd.

Key Knowledge Areas:

◈ Set the default runlevel or boot target.
◈ Change between runlevels / boot targets including single user mode.
◈ Shutdown and reboot from the command line.
◈ Alert users before switching runlevels / boot targets or other major system events.
◈ Properly terminate processes.
◈ Awareness of acpid.

The following is a partial list of the used files, terms and utilities:

◈ /etc/inittab
◈ shutdown
◈ init
◈ /etc/init.d/
◈ telinit
◈ systemd
◈ systemctl
◈ /etc/systemd/
◈ /usr/lib/systemd/
◈ wall

Topic 102: Linux Installation and Package Management


102.1 Design hard disk layout

Weight: 2

Description: Candidates should be able to design a disk partitioning scheme for a Linux system.

Key Knowledge Areas:

◈ Allocate filesystems and swap space to separate partitions or disks.
◈ Tailor the design to the intended use of the system.
◈ Ensure the /boot partition conforms to the hardware architecture requirements for booting.
◈ Knowledge of basic features of LVM.

The following is a partial list of the used files, terms and utilities:

◈ / (root) filesystem
◈ /var filesystem
◈ /home filesystem
◈ /boot filesystem
◈ EFI System Partition (ESP)
◈ swap space
◈ mount points
◈ partitions

102.2 Install a boot manager

Weight: 2

Description: Candidates should be able to select, install and configure a boot manager.

Key Knowledge Areas:

◈ Providing alternative boot locations and backup boot options.
◈ Install and configure a boot loader such as GRUB Legacy.
◈ Perform basic configuration changes for GRUB 2.
◈ Interact with the boot loader.

The following is a partial list of the used files, terms and utilities:

◈ menu.lst, grub.cfg and grub.conf
◈ grub-install
◈ grub-mkconfig
◈ MBR

102.3 Manage shared libraries

Weight: 1

Description: Candidates should be able to determine the shared libraries that executable programs depend on and install them when necessary.

Key Knowledge Areas:

◈ Identify shared libraries.
◈ Identify the typical locations of system libraries.
◈ Load shared libraries.

The following is a partial list of the used files, terms and utilities:

◈ ldd
◈ ldconfig
◈ /etc/ld.so.conf
◈ LD_LIBRARY_PATH

102.4 Use Debian package management

Weight: 3

Description: Candidates should be able to perform package management using the Debian package tools.

Key Knowledge Areas:

◈ Install, upgrade and uninstall Debian binary packages.
◈ Find packages containing specific files or libraries which may or may not be installed.
◈ Obtain package information like version, content, dependencies, package integrity and installation status (whether or not the package is installed).
◈ Awareness of apt.

The following is a partial list of the used files, terms and utilities:

◈ /etc/apt/sources.list
◈ dpkg
◈ dpkg-reconfigure
◈ apt-get
◈ apt-cache


102.5 Use RPM and YUM package management

Weight: 3

Description: Candidates should be able to perform package management using RPM, YUM and Zypper.

Key Knowledge Areas:

◈ Install, re-install, upgrade and remove packages using RPM, YUM and Zypper.
◈ Obtain information on RPM packages such as version, status, dependencies, integrity and signatures.
◈ Determine what files a package provides, as well as find which package a specific file comes from.
◈ Awareness of dnf.

The following is a partial list of the used files, terms and utilities:

◈ rpm
◈ rpm2cpio
◈ /etc/yum.conf
◈ /etc/yum.repos.d/
◈ yum
◈ zypper

102.6 Linux as a virtualization guest

Weight: 1

Description: Candidates should understand the implications of virtualization and cloud computing on a Linux guest system.

Key Knowledge Areas:

◈ Understand the general concept of virtual machines and containers.
◈ Understand common elements virtual machines in an IaaS cloud, such as computing instances, block storage and networking.
◈ Understand unique properties of a Linux system which have to changed when a system is cloned or used as a template.
◈ Understand how system images are used to deploy virtual machines, cloud instances and containers.
◈ Understand Linux extensions which integrate Linux with a virtualization product.
◈ Awareness of cloud-init.

The following is a partial list of the used files, terms and utilities:

◈ Virtual machine
◈ Linux container
◈ Application container
◈ Guest drivers
◈ SSH host keys
◈ D-Bus machine id

Topic 103: GNU and Unix Commands


103.1 Work on the command line

Weight: 4

Description: Candidates should be able to interact with shells and commands using the command line. The objective assumes the Bash shell.

Key Knowledge Areas:

◈ Use single shell commands and one line command sequences to perform basic tasks on the command line.
◈ Use and modify the shell environment including defining, referencing and exporting environment variables.
◈ Use and edit command history.
◈ Invoke commands inside and outside the defined path.

The following is a partial list of the used files, terms and utilities:

◈ bash
◈ echo
◈ env
◈ export
◈ pwd
◈ set
◈ unset
◈ type
◈ which
◈ man
◈ uname
◈ history
◈ .bash_history
◈ Quoting

103.2 Process text streams using filters

Weight: 2

Description: Candidates should be able to apply filters to text streams.

Key Knowledge Areas:

◈ Send text files and output streams through text utility filters to modify the output using standard ◈ UNIX commands found in the GNU textutils package.

The following is a partial list of the used files, terms and utilities:

◈ bzcat
◈ cat
◈ cut
◈ head
◈ less
◈ md5sum
◈ nl
◈ od
◈ paste
◈ sed
◈ sha256sum
◈ sha512sum
◈ sort
◈ split
◈ tail
◈ tr
◈ uniq
◈ wc
◈ xzcat
◈ zcat

103.3 Perform basic file management

Weight: 4

Description: Candidates should be able to use the basic Linux commands to manage files and directories.

Key Knowledge Areas:

◈ Copy, move and remove files and directories individually.
◈ Copy multiple files and directories recursively.
◈ Remove files and directories recursively.
◈ Use simple and advanced wildcard specifications in commands.
◈ Using find to locate and act on files based on type, size, or time.
◈ Usage of tar, cpio and dd.

The following is a partial list of the used files, terms and utilities:

◈ cp
◈ find
◈ mkdir
◈ mv
◈ ls
◈ rm
◈ rmdir
◈ touch
◈ tar
◈ cpio
◈ dd
◈ file
◈ gzip
◈ gunzip
◈ bzip2
◈ bunzip2
◈ xz
◈ unxz
◈ file globbing

103.4 Use streams, pipes and redirects

Weight: 4

Description: Candidates should be able to redirect streams and connect them in order to efficiently process textual data. Tasks include redirecting standard input, standard output and standard error, piping the output of one command to the input of another command, using the output of one command as arguments to another command and sending output to both stdout and a file.

Key Knowledge Areas:

◈ Redirecting standard input, standard output and standard error.
◈ Pipe the output of one command to the input of another command.
◈ Use the output of one command as arguments to another command.
◈ Send output to both stdout and a file.

The following is a partial list of the used files, terms and utilities:

◈ tee
◈ xargs

103.5 Create, monitor and kill processes

Weight: 4

Description: Candidates should be able to perform basic process management.

Key Knowledge Areas:

◈ Run jobs in the foreground and background.
◈ Signal a program to continue running after logout.
◈ Monitor active processes.
◈ Select and sort processes for display.
◈ Send signals to processes.

The following is a partial list of the used files, terms and utilities:

◈ &
◈ bg
◈ fg
◈ jobs
◈ kill
◈ nohup
◈ ps
◈ top
◈ free
◈ uptime
◈ pgrep
◈ pkill
◈ killall
◈ watch
◈ screen
◈ tmux

103.6 Modify process execution priorities

Weight: 2

Description: Candidates should should be able to manage process execution priorities.

Key Knowledge Areas:

◈ Know the default priority of a job that is created.
◈ Run a program with higher or lower priority than the default.
◈ Change the priority of a running process.

The following is a partial list of the used files, terms and utilities:

◈ nice
◈ ps
◈ renice
◈ top

103.7 Search text files using regular expressions

Weight: 3

Description: Candidates should be able to manipulate files and text data using regular expressions. This objective includes creating simple regular expressions containing several notational elements as well as understanding the differences between basic and extended regular expressions. It also includes using regular expression tools to perform searches through a filesystem or file content.

Key Knowledge Areas:

◈ Create simple regular expressions containing several notational elements.
◈ Understand the differences between basic and extended regular expressions.
◈ Understand the concepts of special characters, character classes, quantifiers and anchors.
◈ Use regular expression tools to perform searches through a filesystem or file content.
◈ Use regular expressions to delete, change and substitute text.

The following is a partial list of the used files, terms and utilities:

◈ grep
◈ egrep
◈ fgrep
◈ sed
◈ regex(7)

103.8 Basic file editing

Weight: 3

Description: Candidates should be able to edit text files using vi. This objective includes vi navigation, vi modes, inserting, editing, deleting, copying and finding text. It also includes awareness of other common editors and setting the default editor.

Key Knowledge Areas:

◈ Navigate a document using vi.
◈ Understand and use vi modes.
◈ Insert, edit, delete, copy and find text in vi.
◈ Awareness of Emacs, nano and vim.
◈ Configure the standard editor.

Terms and Utilities:

◈ vi
◈ /, ?
◈ h,j,k,l
◈ i, o, a
◈ d, p, y, dd, yy
◈ ZZ, :w!, :q!
◈ EDITOR

Topic 104: Devices, Linux Filesystems, Filesystem Hierarchy Standard


104.1 Create partitions and filesystems

Weight: 2

Description: Candidates should be able to configure disk partitions and then create filesystems on media such as hard disks. This includes the handling of swap partitions.

Key Knowledge Areas:

◈ Manage MBR and GPT partition tables
◈ Use various mkfs commands to create various filesystems such as:
     ◈ ext2/ext3/ext4
     ◈ XFS
     ◈ VFAT
     ◈ exFAT

◈ Basic feature knowledge of Btrfs, including multi-device filesystems, compression and subvolumes.

The following is a partial list of the used files, terms and utilities:

◈ fdisk
◈ gdisk
◈ parted
◈ mkfs
◈ mkswap

104.2 Maintain the integrity of filesystems

Weight: 2

Description: Candidates should be able to maintain a standard filesystem, as well as the extra data associated with a journaling filesystem.

Key Knowledge Areas:

◈ Verify the integrity of filesystems.
◈ Monitor free space and inodes.
◈ Repair simple filesystem problems.

The following is a partial list of the used files, terms and utilities:

◈ du
◈ df
◈ fsck
◈ e2fsck
◈ mke2fs
◈ tune2fs
◈ xfs_repair
◈ xfs_fsr
◈ xfs_db

104.3 Control mounting and unmounting of filesystems

Weight: 3

Description: Candidates should be able to configure the mounting of a filesystem.

Key Knowledge Areas:

◈ Manually mount and unmount filesystems.
◈ Configure filesystem mounting on bootup.
◈ Configure user mountable removable filesystems.
◈ Use of labels and UUIDs for identifying and mounting file systems.
◈ Awareness of systemd mount units.

The following is a partial list of the used files, terms and utilities:

◈ /etc/fstab
◈ /media/
◈ mount
◈ umount
◈ blkid
◈ lsblk

104.4 Removed

104.5 Manage file permissions and ownership

Weight: 3

Description: Candidates should be able to control file access through the proper use of permissions and ownerships.

Key Knowledge Areas:

◈ Manage access permissions on regular and special files as well as directories.
◈ Use access modes such as suid, sgid and the sticky bit to maintain security.
◈ Know how to change the file creation mask.
◈ Use the group field to grant file access to group members.

The following is a partial list of the used files, terms and utilities:

◈ chmod
◈ umask
◈ chown
◈ chgrp

104.6 Create and change hard and symbolic links

Weight: 2

Description: Candidates should be able to create and manage hard and symbolic links to a file.

Key Knowledge Areas:

◈ Create links.
◈ Identify hard and/or soft links.
◈ Copying versus linking files.
◈ Use links to support system administration tasks.

The following is a partial list of the used files, terms and utilities:

◈ ln
◈ ls

104.7 Find system files and place files in the correct location

Weight: 2

Description: Candidates should be thoroughly familiar with the Filesystem Hierarchy Standard (FHS), including typical file locations and directory classifications.

Key Knowledge Areas:

◈ Understand the correct locations of files under the FHS.
◈ Find files and commands on a Linux system.
◈ Know the location and purpose of important file and directories as defined in the FHS.

The following is a partial list of the used files, terms and utilities:

◈ find
◈ locate
◈ updatedb
◈ whereis
◈ which
◈ type
◈ /etc/updatedb.conf