Subsections of Intro

Intro

This book is intended to be a Linux crash course used in induction training for new DevOps engineers. It contains knowledge I gained working as a System Engineer/Application Administrator/DevOps/SRE.

I am still deciding on the structure and what else to add.

Course Description

Linux for DevOps Engineers

Duration: 2 days | 3-4 hours/day

Purpose

This course is designed to help you quickly get started with learning Linux as an Application Administrator or DevOps Engineers. Beginning with understanding Linux from an OPS perspective you will learn about Linux filesystem and permissions, processes, basic and advanced commands useful for debugging os/application issues.

  • Day 1 – QuickStart, Basic Commands, Filesystem
  • Day 2 – Permissions, Processes, Advanced commands

Audience

This course is designed for technical professionals who require the skills to administer applications deployed on Linux systems.

Prerequisites

None.

Lab

In this course, we will use Ubuntu 20.04 a free resource from katakode.com

https://www.katacoda.com/scenario-examples/courses/environment-usages/ubuntu-2004

Quick Start

Don’t

  • Make the user root (system administrator’s account) accessible via ssh.
  • Run applications as root, applications might contain a vulnerability if the application is compromised it can run malicious code as root.
  • copy/paste rm select * from ... in your console, careful with what you have in your system clipboard.

Avoid

  • configuring server logins with user and password.
  • using root user as a system admin, you can make mistakes.
  • using globbing *, * matches any string, including the empty string. eg: rm *

Shells

The shell is a program that takes commands from the keyboard and gives them to the operating system to perform. Shells are usually run via a terminal emulator, this is a program that opens a window and lets you interact with a shell.

Popular shells: bash, zsh, ksh, dash, sh

Using Bash features

Key or key combinationFunction
Ctrl+AMove the cursor to the beginning of the command line
Ctrl+CEnd a running program and return the prompt
Ctrl+DLog out of the current shell session, equal to typing exit or logout
Ctrl+EMove the cursor to the end of the command line
Ctrl+HGenerate backspace character
Ctrl+LClear this terminal
Ctrl+RSearch command history
Ctrl+ZSuspend a program
ArrowLeft and ArrowRightMove the cursor one place to the left or right on the command line
ArrowUp and ArrowDownBrowse history. Go to the line that you want to repeat, edit details if necessary, and press Enter to save time.
TabCommand or filename completion
Tab TabShows file or command completion possibilities

Getting help

# man [command]
man ls           # see manual for ls command
# command --help (long)
ps --help        # print program help