Essential Linux Commands

Book description

Unlock the power of Linux with this quick-start guide to leveling up your admin skills, packed with clear explanations and hands-on examples

Key Features

  • Explore Linux commands for mounting, file manipulation, and running Linux on the cloud
  • Learn commands for checking and configuring network card statistics, firewall rules, and interfaces
  • Understand how to utilize SELinux in keeping systems adequately hardened and avoiding various security risks
  • Purchase of the print or Kindle book includes a free PDF eBook

Book Description

The role of a system administrator is ever-evolving, with the Linux command line at its core. This makes Linux command-line mastery an essential skill to demonstrate your ability to efficiently manage and maintain systems efficiently. Essential Linux Commands addresses a diverse range of topics, including package management, file manipulation, networking strategies, system monitoring, and diagnostic tools. Each command is intricately explained to eliminate any ambiguity, ensuring ease of implementation in real-world scenarios.

This book explains how to use SELinux to maintain security, run Linux machines on AWS Cloud, and transfer and download files to remote systems. With the help of practical examples and use cases, you’ll not only gain a thorough understanding of a command’s syntax but also grasp its functional breadth and limitations. The book also explores commands frequently used by system administrators to check network card statistics and firewall rules.

Whether you’re a beginner or an experienced administrator, this book is an invaluable resource, filling in the gaps in your skill set and helping you improve your skills and expertise in Linux administration.

What you will learn

  • Execute commands to launch applications, control services, and change network settings
  • Develop your skills to use commands for package management, file manipulation, and networking
  • Get clear explanations and practical examples for each command
  • Discover tips and techniques to use the Linux command line effectively
  • Get to grips with troubleshooting common problems and fixing errors
  • Master best practices to manage and maintain Linux systems
  • Develop expertise in system performance, security, and Linux in the cloud

Who this book is for

This book is for system administrators, IT professionals, and students who want to enhance their knowledge of Linux administration and improve their skills in this field. Whether you’re just starting out in system administration or have years of experience, this book is an invaluable resource for mastering the Linux command line and becoming a more proficient system administrator. Essential Linux Commands is also well-suited for individuals interested in expanding their Linux know-how and its applications in various industries and environments.

Table of contents

  1. Essential Linux Commands
  2. Contributors
  3. About the author
  4. About the reviewers
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Conventions used
    5. Get in touch
    6. Share your thoughts
    7. Download a free PDF copy of this book
  6. Part 1:Server Installations and Management Commands
  7. Chapter 1: Getting a CentOS Server Up and Running
    1. Downloading the OS installation file
    2. Downloading and setting up a hypervisor
    3. Package installation commands
      1. YUM package management system
      2. Common package installation commands
    4. Information commands
    5. Summary
  8. Chapter 2: Linux User and Group Commands
    1. useradd, userdel, and usermod
      1. useradd
      2. userdel
      3. usermod
    2. Files, directories, and permission commands
      1. chmod
      2. chown
      3. chgrp
    3. groupdel, groupmod, groupadd, and grpck
    4. pwck, chage, and passwd commands
    5. find, locate, and whereis commands
    6. Summary
  9. Chapter 3: File Compression and Archival Commands
    1. gunzip and gzip
    2. tar, rar, and unrar
    3. zip and unzip
    4. bunzip2, bzip2, and more
    5. Summary
  10. Part 2:Frequently Used Commands – Part 1
  11. Chapter 4: Format and Disk Space Commands
    1. The history and evolution of disk formatting and partitioning in Linux
    2. Steps to create a partition
    3. fdisk, lsblk, df, and du
      1. Checking the disk space usage of a directory
      2. Finding large files in a directory
    4. Displaying (dpkg and rpm) package space
      1. Installing a package
      2. Querying the details of a package
    5. mkfs, mke2fs, fdformat, and more
    6. Summary
  12. Chapter 5: Linux Permissions Commands
    1. Why permission commands?
    2. Types of permissions
    3. chmod
    4. chown
    5. Utilizing absolute paths in commands
    6. chgrp
    7. umask
    8. sudo
    9. Summary
  13. Chapter 6: Filesystem Mount and Manipulation Commands
    1. Linux mount commands
    2. The mount command
    3. The umount command
    4. The fuser command
    5. File manipulation using cat, grep, and more
    6. Summary
  14. Part 3:Frequently Used Commands – Part 2
  15. Chapter 7: File Content and Conversion Commands
    1. The tail and file commands
    2. The convert command
    3. Using dos2unix to convert MS-DOS files to Unix
    4. Using unix2dos to convert Unix files to MS-DOS
    5. The recode command
    6. Summary
  16. Chapter 8: Linux SWAP Commands
    1. The swapon command
    2. The free command
    3. Summary
  17. Chapter 9: Linux Monitoring and Debugging Commands
    1. The top command
    2. The ps command
    3. The pstree command
    4. The strace command
    5. The watch command
    6. The smartctl command
    7. The uptime command
    8. The lsof command
    9. The lsmod command
    10. The last reboot command
    11. The last command
    12. The w command
    13. The vmstat command
    14. The kill command
    15. The pkill command
    16. Summary
  18. Chapter 10: Linux IPTABLES and Network Commands
    1. iptables -t ACCEPT
    2. iptables -t DROP
    3. ifconfig, ip, route, and netstat
      1. ip, route, and netstat
    4. Hostname and nslookup
    5. host
    6. Summary
  19. Chapter 11: File Transfer, Downloading, and Managing Log Files
    1. Copying files into remote systems using netcat and socat
    2. Downloading files with wget and curl
    3. Exploring common log files
    4. Summary
  20. Part 4:Linux Security and the Cloud
  21. Chapter 12: Exploring Linux Security
    1. Utilizing enforcing and permissive modes
      1. A short introduction to Linux hardening and the role of SELinux’s enforcing and passive modes
      2. The role of enforcing mode
      3. The role of permissive mode
    2. Enabling or disabling SELinux Boolean values
      1. Searching for a Boolean and getting its information
      2. Enabling a SELinux Boolean value
      3. Disabling a SELinux Boolean value
    3. Locking user accounts
    4. Securing SSH
    5. Summary
  22. Chapter 13: Linux in the Cloud
    1. Creating EC2 instances on AWS
    2. Connecting to a created EC2 instance using PuTTY
    3. Working on our EC2 instance
    4. Summary
  23. Index
    1. Why subscribe?
  24. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share your thoughts
    3. Download a free PDF copy of this book

Product information

  • Title: Essential Linux Commands
  • Author(s): Paul Olushile
  • Release date: November 2023
  • Publisher(s): Packt Publishing
  • ISBN: 9781803239033