Essential Linux Commands Contributors About the author About the reviewers Preface Who this book is for What this book covers To get the most out of this book Conventions used Get in touch Share your thoughts Download a free PDF copy of this book Part 1:Server Installations and Management Commands 1 Getting a CentOS Server Up and Running Downloading the OS installation file Downloading and setting up a hypervisor Package installation commands YUM package management system Common package installation commands Information commands Summary 2 Linux User and Group Commands useradd, userdel, and usermod useradd userdel usermod Files, directories, and permission commands chmod chown chgrp groupdel, groupmod, groupadd, and grpck pwck, chage, and passwd commands find, locate, and whereis commands Summary 3 File Compression and Archival Commands gunzip and gzip tar, rar, and unrar zip and unzip bunzip2, bzip2, and more Summary Part 2:Frequently Used Commands – Part 1 4 Format and Disk Space Commands The history and evolution of disk formatting and partitioning in Linux Steps to create a partition fdisk, lsblk, df, and du Checking the disk space usage of a directory Finding large files in a directory Displaying (dpkg and rpm) package space Installing a package Querying the details of a package mkfs, mke2fs, fdformat, and more Summary 5 Linux Permissions Commands Why permission commands? Types of permissions chmod chown Utilizing absolute paths in commands chgrp umask sudo Summary 6 Filesystem Mount and Manipulation Commands Linux mount commands The mount command The umount command The fuser command File manipulation using cat, grep, and more Summary Part 3:Frequently Used Commands – Part 2 7 File Content and Conversion Commands The tail and file commands The convert command Using dos2unix to convert MS-DOS files to Unix Using unix2dos to convert Unix files to MS-DOS The recode command Summary 8 Linux SWAP Commands The swapon command The free command Summary 9 Linux Monitoring and Debugging Commands The top command The ps command The pstree command The strace command The watch command The smartctl command The uptime command The lsof command The lsmod command The last reboot command The last command The w command The vmstat command The kill command The pkill command Summary 10 Linux IPTABLES and Network Commands iptables -t ACCEPT iptables -t DROP ifconfig, ip, route, and netstat ip, route, and netstat Hostname and nslookup host Summary 11 File Transfer, Downloading, and Managing Log Files Copying files into remote systems using netcat and socat Downloading files with wget and curl Exploring common log files Summary Part 4:Linux Security and the Cloud 12 Exploring Linux Security Utilizing enforcing and permissive modes A short introduction to Linux hardening and the role of SELinux’s enforcing and passive modes The role of enforcing mode The role of permissive mode Enabling or disabling SELinux Boolean values Searching for a Boolean and getting its information Enabling a SELinux Boolean value Disabling a SELinux Boolean value Locking user accounts Securing SSH Summary 13 Linux in the Cloud Creating EC2 instances on AWS Connecting to a created EC2 instance using PuTTY Working on our EC2 instance Summary Index Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share your thoughts Download a free PDF copy of this book Unlock the power of Linux with this quick-start guide to leveling up your admin skills, packed with clear explanations and hands-on examplesKey FeaturesExplore Linux commands for mounting, file manipulation, and running Linux on the cloudLearn commands for checking and configuring network card statistics, firewall rules, and interfacesUnderstand how to utilize SELinux in keeping systems adequately hardened and avoiding various security risksPurchase of the print or Kindle book includes a free PDF eBookBook DescriptionThe 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 learnExecute commands to launch applications, control services, and change network settingsDevelop your skills to use commands for package management, file manipulation, and networkingGet clear explanations and practical examples for each commandDiscover tips and techniques to use the Linux command line effectivelyGet to grips with troubleshooting common problems and fixing errorsMaster best practices to manage and maintain Linux systemsDevelop expertise in system performance, security, and Linux in the cloudWho this book is forThis 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. 100 Linux commands every system administrator should know Unlock the power of Linux with this quick-start guide to leveling up your admin skills, packed with clear explanations and hands-on examples 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