CentOS Quick Start Guide

Book description

A concise walk-through of CentOS 7, starting from installation to securing it's environment.

Key Features

  • No previous Linux environment experience needed for reading this book
  • Get comfortable with a popular and stable Red Hat Enterprise Linux distribution
  • Most of the command line based concepts are explained with graphics

Book Description

Linux kernel development has been the worlds largest collaborative project to date. With this practical guide, you will learn Linux through one of its most popular and stable distributions.

This book will introduce you to essential Linux skills using CentOS 7. It describes how a Linux system is organized, and will introduce you to key command-line concepts you can practice on your own. It will guide you in performing basic system administration tasks and day-to-day operations in a Linux environment.

You will learn core system administration skills for managing a system running CentOS 7 or a similar operating system, such as RHEL 7, Scientific Linux, and Oracle Linux. You will be able to perform installation, establish network connectivity and user and process management, modify file permissions, manage text files using the command line, and implement basic security administration after covering this book.

By the end of this book, you will have a solid understanding of working with Linux using the command line.

What you will learn

  • Understand file system hierarchy and essential command-line skills
  • Use Vi editor, I/O redirections and how to work with common text manipulating tools
  • Create, delete, modify user accounts and manage passwords and their aging policy
  • Manage file ownership, permissions, and ACL
  • Execute process management and monitoring on the command line
  • Validate and manage network configuration using nmcli
  • Manage remote logins using SSH and file transfer using SCP and Rsync
  • Understand system logging, how to control system services with systemd and systemctl, and manage firewalId

Who this book is for

Any individual who wants to learn how to use Linux as server or desktop in his environment. Whether you are a developer, budding system administrator, or tech lover with no previous Linux administration background, you will be able to start your journey in Linux using CentOS 7 with this book.

Publisher resources

View/Submit Errata

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. CentOS Quick Start Guide
  3. Dedication
  4. About Packt
    1. Why subscribe?
    2. Packt.com
  5. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Conventions used
    4. Get in touch
      1. Reviews
  7. Getting Started with CentOS 7
    1. Preparing to install CentOS 7
      1. Getting the right hardware
      2. Getting the software
      3. Finalizing server setup details
    2. Performing manual installation
    3. Accessing the command line using the console
      1. Starting a Terminal 
      2. Command-line syntax and structure
      3. Exiting the shell
    4. Introducing the Bash shell
    5. Bash shell and command execution
      1. Tab completion
      2. Command-line editing shortcuts
      3. The history command
      4. Command aliases
        1. Listing current aliases
        2. Setting an alias
        3. Removing an alias
    6. Summary
  8. Command-Line and Filesystem Navigation
    1. Understanding the CentOS 7 filesystem hierarchy
    2. Using man pages and the help command
      1. Different types of documentation available in Linux 
        1. Using the man command
        2. Using the GNU info command
        3. Using the help command and the --help option
        4. Other sources of documentation 
    3. Managing filenames with path expansion 
      1. File globbing
      2. Wildcard expansion
      3. Tilde expansion
      4. Brace expansion
      5. Command substitution
      6. Quoting and escaping
      7. File naming conventions
    4. Managing files using command-line tools
      1. Navigation commands
      2. File management commands 
    5. Managing archives and compressed files
      1. Compression
        1. gzip and gunzip compression
        2. bzip2 and bunzip2 compression
        3. xz compression
        4. zip
        5. Archiving 
          1. Archiving with tar 
          2. Archiving and compression (.gzip) using tar 
          3. Archiving, compression (.bzip2), and listing contents using tar 
          4. Archiving and compression (.xz) using tar 
    6. Summary
  9. Managing Text Files
    1. Different methods to create a text file
      1. Create a text file using the cat command
      2. Create an empty text file using the touch command
      3. Create a text file using the redirection symbol (>)
      4. Create a text file using the echo or printf command
      5. Create a text file using the vi editor 
    2. Editing files with the vi editor
      1. Working with files in vi editor
      2. Insert Mode
      3. Line Mode
        1. Determining line numbers in Line Mode of vi editor
        2. How to execute external commands in Line Mode
      4. Command Mode
    3. Using text file manipulation tools
      1. Different types of editor used to view file content 
        1. less command
        2. more command
        3. cat command
      2. tac command
      3. head command
      4. tail command
      5. wc command
      6. file command
      7. Viewing compressed files
      8. cut command
      9. sort command
      10. uniq command
      11. paste command
    4. Redirecting output to files and programs
      1. Pipes
      2. tee command
    5. Using grep for text matching
      1. Text extraction using sed and awk 
        1. sed
        2. awk
    6. Finding a file (locate and find commands)
      1. Locate
      2. Find
    7. Summary
  10. User and Group Management
    1. Understanding users and groups in CentOS 7
      1. Defining a user
      2. Identifying the current user
      3. Understanding groups in Linux
    2. Executing commands as superuser in CentOS 7
      1. Switching users with the su command
        1. Disadvantages of using the su command to grant root access to a normal user
      2. Using sudo to run commands as the root user
    3. Creating, modifying, or deleting local user accounts
      1. Creating a user with the useradd command
      2. Modifying a user with the usermod command
      3. Deleting a user account with the userdel command
    4. Creating, modifying, or deleting local group accounts
      1. Creating supplementary groups with groupadd
      2. Modifying existing groups with the groupmod command
      3. Deleting a group with the groupdel command
    5. Managing user passwords and aging policies
      1. Setting a user password using the passwd command
      2. Understanding the shadow password file
      3. Understanding password aging parameters
      4. Restricting user access
      5. Fake shell or nologin shell
    6. Summary
  11. Managing File Permissions
    1. Understanding Linux filesystem permissions
      1. Effect of permissions on files and directories
      2. Viewing applied permissions and ownership
    2. Managing file permissions
      1. Modifying file permissions with chmod using symbols
      2. Managing file permissions with chmod using numbers
    3. Managing file ownership
      1. Understanding default ownership
      2. Modifying user ownership with chown
      3. Modifying group ownership with chown
      4. Modifying both user and group ownership with chown
      5. Modifying group ownership with chgrp
    4. Special permissions
      1. Modifying special permissions for files
      2. Modifying special permission, for directories
        1. Using sticky bit
        2. Using setgid
    5. Managing default permissions
      1. Understanding umask
    6. Managing ACL on files
      1. Viewing ACL permissions
        1. Using getfacl
      2. ACL mask
      3. Modifying ACL permissions
        1. Using setfacl
      4. Removing an ACL
    7. Summary
  12. Process Management
    1. Understanding processes
      1. Defining a process
      2. Process creation on a Linux system
      3. Processes types
        1. Interactive processes
        2. Batch processes
        3. Daemons
        4. Threads
        5. Kernel threads
      4. Process states
    2. Viewing current processes
      1. Listing running processes
        1. The ps command
          1. Displaying processes running from the current shell
          2. Displaying all processes by their user
          3. Displaying all processes in different formats
          4. Sorting processes based on different parameters
          5. Displaying processes by user
          6. Displaying process information by name
          7. Displaying process details by PID
          8. Displaying a process hierarchy in a tree style
          9. Displaying the child processes of a parent
          10. Displaying the thread of a process
          11. Displaying the pid of a process if the process name is known
        2. Using the pstree command
      2. Finding the PID of a running process
        1. Using the pgrep command
        2. pidof
        3. The ps command with grep
    3. Communicating with processes using signals
      1. Defining a signal and its types
      2. Sending signals to processes
        1. Sending signals to processes by PID using the kill command
      3. Sending signals to multiple processes by name
        1. killall
        2. pkill
    4. Monitoring processes and load averages
      1. Understanding load averages on Linux
        1. uptime
        2. w
      2. Real-time interactive process monitoring
        1. top
    5. Managing a processes' priority with nice and renice
      1. Understanding priority
      2. Modifying priority
        1. Viewing the priority of a process
        2. Modifying the priority of a new process (nice value)
        3. Modifying the priority of a running process (renice)
    6. Controlling jobs on the command line
      1. Understanding different terms related to job management
        1. Jobs management with its associated controlling Terminal
        2. Foreground processes or jobs
        3.  Background processes or jobs
        4. Suspending a foreground process to the background
      2. Managing jobs in the background
    7. Summary
  13. Managing Networking in CentOS
    1. Linux networking concepts
      1. Common terms used in Linux networking
        1. IP address
          1. IPv4
          2. IPv6
        2. Different classes of IP addressing
          1. Public classes
          2. Private classes
          3. Loopback address
          4. Link-local address or APIPA
        3. Netmask
        4. Gateway
        5. Hostname
        6. Nameserver
        7. NetworkManager
      2. Network interface naming conventions
    2. Using Linux networking commands
      1. Viewing IP address details
        1. Using the IP command
        2. Using ifconfig command
        3. Netstat 
      2. Viewing the routing information
        1. Using the ip route command
        2. Using route command
        3. Using netstat command
        4. Gateway
      3. Viewing nameserver details
      4. Network troubleshooting utilities
        1. Using ethtool command 
        2. Using ping command
        3. Using tracepath command
        4. Using traceroute command
        5. Using mtr command
        6. Verifying DNS connectivity
          1. Using nslookup command
          2. Using host command
          3. Using dig command
      5. Finding local ports and services information
        1. Using the ss command
        2. Using the netstat command
      6. Web utilities
        1. Graphical and non-graphical web browsers
        2. Command-line file downloader (wget)
        3. Command-line download and upload using curl
    3. Managing a network with nmcli
      1. Defining basic terms
        1. Device or interface
        2. Connection
      2. Displaying network information using nmcli
      3. Creating network connections using nmcli
      4. Modifying network interfaces using nmcli
    4. Editing network configuration files
      1. Configuring networking options in static and dynamic modes
    5. Configuring hostnames and name resolutions
      1. Displaying and modifying the hostname
      2. Modifying nameservers (DNS sever)
    6. Accessing remote logins with SSH
      1. Understanding OpenSSH
      2. Executing commands over SSH remotely
      3. Key-based SSH authentication
      4. Configuring ssh-keygen for password-less authentication
        1. Creating a SSH key pair
      5. Configuring and securing SSH logins
    7. Transferring files in Linux
      1. Secure file transfer using SCP
        1. Local to remote filesystem file transfer
        2. Remote to local filesystem file transfer
      2. Synchronizing files using rsync
        1. Synchronizing data locally from one folder to another for backup
        2. Synchronizing data from a local to remote host filesystem
        3. Synchronizing data from remote host to local filesystem
    8. Summary
  14. Software Package Management
    1. Managing applications using RPM
      1. Anatomy of a RPM
      2. What happens when you update an application
      3. Using RPM to query options with RPM packages
      4. Verifying RPM package signatures
      5. Using RPM to install packages
      6. Using rpm to remove packages
      7. Using RPM to upgrade packages
      8. Using RPM to verify packages
      9. Importing a RPM GPG key
    2. Managing applications using YUM
      1. Understanding the YUM package manager
      2. Using the YUM command line
        1. Finding an application using yum
        2. Installing applications using YUM
        3. Displaying packages and their information with YUM
        4. Removing applications using yum
        5. Updating applications and the system using yum
        6. Managing groups of applications using YUM
        7. Using YUM history
        8. Managing application repositories using YUM
        9. Handling other miscellaneous options of yum
    3. Managing official and third-party repositories
      1. Official repositories of CentOS 7
      2. Third-party repositories
    4. Creating custom repositories
    5. Summary
  15. Overview of Essential Advance Utilities
    1. Understanding system logging
      1. Working with rsyslog
        1. Configuring rsyslogd sections
          1. Rsyslogd facilities and priorities
          2. Rsyslogd rules
        2. Log file rotation
        3. Analyzing syslog entries
        4. Monitoring live log file traffic using the tail command
        5. Using the logger command
      2. Working with systemd-journald
        1. Finding events with the journalctl command
        2. Configuring systemd-journald to store logs persistently
    2. Understanding how to control the system and services
      1. Defining essential terms
        1. What is a daemon?
        2. What is a socket?
        3. What is systemd?
        4. What are units?
        5. What is systemctl?
      2. Working with systemd and systemctl
        1. Viewing states of service with systemctl
        2. Viewing unit files with systemctl
        3. Unit dependencies and unit file structure
        4. Managing daemons using systemctl
          1. Masking services
      3. Controlling the boot process using systemd
        1. What are systemd targets?
        2. Switching your targets at runtime
        3. Changing the default target of the system
    3. Understanding SELinux concepts
      1. SELinux contexts
        1. Viewing SELinux context
      2. Working with SELinux
        1. Changing SELinux modes
          1. Using setenforce for runtime changes
          2. Setting default modes of SELinux
        2. Modifying file context
          1. Using restorecon for restoring the default context
          2. Using chon for context management
          3. Using semanage for context management
        3. Modifying port context
        4. Managing SELinux Booleans
        5. Managing SELinux troubleshooting
          1. Using sealert for troubleshooting
    4. Understanding firewall concepts in CentOS 7
      1. Firewalld concepts
        1. Firewalld zones
        2. Firewalld services
        3. Managing firewalld
          1. Using the firewalld-cmd command-line tool
          2. Using the firewalld-config graphical tool
      2. Working with firewalld
    5. Summary
  16. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: CentOS Quick Start Guide
  • Author(s): Shiwang Kalkhanda
  • Release date: December 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789344875