Book Image

Fundamentals of Linux

By : Oliver Pelz
Book Image

Fundamentals of Linux

By: Oliver Pelz

Overview of this book

Linux is a Unix-like operating system assembled under the model of free and open source software development and distribution. Fundamentals of Linux will help you learn all the essentials of the Linux command line required to get you started. The book will start by teaching you how to work with virtualization software and install CentOS 7 Linux as a VM. Then, you will get to grips with the workings of various command line operations, such as cursor movement, commands, options, and arguments. As you make your way through the chapters, the book will not only focus on the most essential Linux commands but also give an introduction to Bash shell scripting. Finally, you will explore advanced topics, such as networking and troubleshooting your system, and you will get familiar with the advanced file permissions: ACL, setuid, and setgid. Fundamentals of Linux includes real-world tasks, use cases, and problems that, as a system administrator, you might encounter in your day-to-day activities.
Table of Contents (7 chapters)

Essential Linux commands

In this section, we will learn more essential Linux Bash commands that every Linux user should know. Use the cat command to quickly cut columns out of text files. This is like a light version of awk.

We'll be discussing the following commands:

  • cat
  • sort
  • awk
  • tee
  • tar
  • Other miscellaneous commands

First, let's create a smaller version of the passwd file to work with the cat command:

-d sets the field delimiter; by default it's the tab character. -f uses a single field number or comma-separated list of field numbers that you want to extract. If using comma-separated lists also, the split input delimiter will be output, which can be changed using -- output-delimiter.

Next, let's create a smaller version of the services file without comments and empty lines. Using the cat command is very limited to the special use case that a file separator...