0%

Book Description

Learn over 116 Linux commands to develop the skills you need to become a professional Linux system administrator

Key Features

  • Explore essential Linux commands and understand how to use Linux help tools
  • Discover the power of task automation with bash scripting and Cron jobs
  • Get to grips with various network configuration tools and disk management techniques

Book Description

Linux is one of the most sought-after skills in the IT industry, with jobs involving Linux being increasingly in demand. Linux is by far the most popular operating system deployed in both public and private clouds; it is the processing power behind the majority of IoT and embedded devices. Do you use a mobile device that runs on Android? Even Android is a Linux distribution.

This Linux book is a practical guide that lets you explore the power of the Linux command-line interface. Starting with the history of Linux, you'll quickly progress to the Linux filesystem hierarchy and learn a variety of basic Linux commands. You'll then understand how to make use of the extensive Linux documentation and help tools. The book shows you how to manage users and groups and takes you through the process of installing and managing software on Linux systems. As you advance, you'll discover how you can interact with Linux processes and troubleshoot network problems before learning the art of writing bash scripts and automating administrative tasks with Cron jobs. In addition to this, you'll get to create your own Linux commands and analyze various disk management techniques.

By the end of this book, you'll have gained the Linux skills required to become an efficient Linux system administrator and be able to manage and work productively on Linux systems.

What you will learn

  • Master essential Linux commands and analyze the Linux filesystem hierarchy
  • Find out how to manage users and groups in Linux
  • Analyze Linux file ownership and permissions
  • Automate monotonous administrative tasks with Cron jobs and bash scripts
  • Use aliases to create your own Linux commands
  • Understand how to interact with and manage Linux processes
  • Become well-versed with using a variety of Linux networking commands
  • Perform disk partitioning, mount filesystems, and create logical volumes

Who this book is for

This book doesn't assume any prior Linux knowledge, which makes it perfect for beginners. Intermediate and advanced Linux users will also find this book very useful as it covers a wide range of topics necessary for Linux administration.

Table of Contents

  1. Title Page
  2. Copyright and Credits
    1. Learn Linux Quickly
  3. Dedication
  4. About Packt
    1. Why subscribe?
  5. Contributors
    1. About the author
    2. 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
    4. Download the color images
    5. Conventions used
    6. Get in touch
    7. Reviews
  7. Your First Keystrokes
    1. A little bit of history
    2. Linux today and the future
    3. Installing a Linux virtual machine
    4. Terminal versus Shell
    5. A few simple commands
    6. Knowledge check
    7. True or false
  8. Climbing the Tree
    1. The Linux filesystem
    2. Navigating through the directory tree
    3. Parent and current directories
    4. Moving around quickly
    5. Go back home!
    6. Take me back!
    7. Hidden Files
    8. Passing command arguments
    9. The touch command
    10. Making directories
    11. Combining command options
    12. Knowledge check
    13. True or false
  9. Meet the Editors
    1. Graphical editors – gedit and kate
    2. The nano editor
    3. The vi editor
    4. Insert mode
    5. Command mode
    6. Saving and exiting vi
    7. File viewing commands
    8. The cat command
    9. The tac command
    10. The more command
    11. The less command
    12. Heads or tails?
    13. Knowledge check
  10. Copying, Moving, and Deleting Files
    1. Copying one file
    2. Copying multiple files
    3. Copying one directory
    4. Copying multiple directories
    5. Moving one file
    6. Moving multiple files
    7. Moving one directory
    8. Moving multiple directories
    9. Renaming files
    10. Hiding files
    11. Removing files
    12. Removing directories
    13. Knowledge check
    14. True or false
  11. Read Your Manuals!
    1. The four categories of linux commands
    2. Determining a command's type
    3. Finding a command's location
    4. What does the command do?
    5. The man page
    6. Help for shell builtins
    7. The info page
    8. The very helpful apropos command
    9. The /usr/share/doc directory
    10. Knowledge check
    11. True or false
  12. Hard versus Soft Links
    1. File inodes
    2. Displaying file inode number
    3. Creating soft links
    4. Creating hard links
    5. Knowledge check
    6. True or false
  13. Who Is Root?
    1. Accessing the root user
    2. Setting the root password
    3. The dash difference
    4. Knowledge check
    5. True or false
  14. Controlling the Population
    1. The /etc/passwd file
    2. Adding users
    3. Modifying user attributes
    4. Defining the skeleton
    5. Changing the defaults
    6. Removing users
    7. The /etc/group file
    8. Adding groups
    9. Adding group members
    10. Primary versus secondary groups
    11. Removing groups
    12. File ownership and permissions
    13. Changing file ownership
    14. Understanding file permissions
    15. Changing file permissions
    16. Directory permissions
    17. Using octal notation
    18. Knowledge check
    19. True or false
  15. Piping and I/O Redirection
    1. Linux pipes
    2. Input and output redirection
    3. Redirecting standard output
    4. Redirecting standard error
    5. Redirecting all output to the same file
    6. Discarding output
    7. Redirecting standard input
    8. Knowledge check
  16. Analyzing and Manipulating Files
    1. Spot the difference
    2. Viewing file size
    3. Counting characters, words, and lines
    4. Viewing the file type
    5. Sorting files
    6. Showing unique lines
    7. Searching for patterns
    8. The stream editor
    9. Translating characters
    10. Cutting text
    11. Text processing with awk
    12. Wildcard characters
    13. Regular expressions
    14. Knowledge check
  17. Let's Play Find and Seek
    1. The locate command
    2. Updating the file database
    3. The find command
    4. Knowledge check
  18. You Got a Package
    1. What is a package?
    2. The role of a package manager
    3. Where do packages come from?
    4. How to download packages
    5. How to install packages
    6. How to remove packages
    7. How to search for packages
    8. How to show package information
    9. Listing all packages
    10. Patching your system
    11. Knowledge check
  19. Kill the Process
    1. What is a process?
    2. Parent process versus child process
    3. Foreground versus background processes
    4. Sending signals to processes
    5. Working with process priority
    6. Viewing a process priority
    7. Setting priorities for new processes
    8. Changing a process priority
    9. The /proc directory
    10. Knowledge check
  20. The Power of Sudo
    1. Examples of privileged commands
    2. Granting access with sudo
    3. User and command aliases
    4. Group privileges
    5. Listing user privileges
    6. visudo versus /etc/sudoers
    7. Knowledge check
  21. What's Wrong with the Network?
    1. Testing network connectivity
    2. Listing your network interfaces
    3. The ip command
    4. The nmcli command
    5. Checking your IP address
    6. Checking your gateway address
    7. Flying with traceroute
    8. Breaking your DNS
    9. Changing your hostname
    10. Restarting your network interface
    11. Knowledge check
  22. Bash Scripting Is Fun
    1. Creating simple scripts
    2. The PATH variable
    3. Reading user input
    4. Passing arguments to scripts
    5. Using the if condition
    6. Looping in bash scripts
    7. Using the for loop
    8. Using the while loop
    9. Using the until loop
    10. Bash script functions
    11. Passing function arguments
    12. No browsing for you
    13. Knowledge check
  23. You Need a Cron Job
    1. Our first cron job
    2. Run every five minutes
    3. More cron examples
    4. Automating system patching
    5. Running a job once
    6. Knowledge check
  24. Archiving and Compressing Files
    1. Creating an archive
    2. Viewing archive contents
    3. Extracting archive files
    4. Compressing with gzip
    5. Compressing with bzip2
    6. Compressing with xz
    7. Measuring performance
    8. Knowledge check
  25. Create Your Own Commands
    1. Your first alias
    2. One alias for multiple commands
    3. Listing all aliases
    4. Creating a permanent alias
    5. Removing an alias
    6. Some useful aliases
    7. Adding safety nets
    8. Go crazy with aliases
    9. Knowledge check
  26. Everyone Needs Disk Space
    1. Where are your devices?
    2. Where is your hard disk?
    3. Adding disks to your virtual machine
    4. Creating new disk partitions
    5. Creating new filesystems
    6. Mounting filesystems
    7. Unmounting filesystems
    8. Permanently mounting filesystems
    9. Running out of space
    10. Corrupting and fixing filesystems
    11. LVM to the rescue
    12. Installing the LVM package
    13. Three layers of abstraction
    14. Creating physical volumes
    15. Creating volume groups
    16. Creating logical volumes
    17. Extending logical volumes
    18. Extending volume groups
    19. Knowledge check
  27. echo ”Goodbye My Friend”
    1. Where to go next?
    2. Keep in touch
  28. Assessments
    1. Knowledge check 1
    2. True or false
    3. Knowledge check 2
    4. True or false
    5. Knowledge check 3
    6. Knowledge check 4
    7. True or false
    8. Knowledge check 5
    9. True or false
    10. Knowledge check 6
    11. True or false
    12. Knowledge check 7
    13. True or false
    14. Knowledge check 8
    15. True or false
    16. Knowledge check 9
    17. Knowledge check 10
    18. Knowledge check 11
    19. Knowledge check 12
    20. Knowledge check 13
    21. Knowledge check 14
    22. Knowledge check 15
    23. Knowledge check 16
    24. Knowledge check 17
    25. Knowledge check 18
    26. Knowledge check 19
    27. Knowledge check 20
  29. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think
18.221.136.142