Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Notes for the Fedora classroom - command line 101

Fedora Classroom - Command Line 101

  • 1300 UTC, 10th August 2017
  • #fedora-classroom on Freenode
  • Pre-requisites: A linux system with any terminal emulator that runs bash
  • run sudo mandb

Introduction to the shell

  • Preferably a Fedora system, since that's what the instructor will use
  • A program that lets one communicate with the kernel - has built-in commands for various purposes.
  • There are different shells, and they provide different features. We shall use bash

Hands on session

  • Built ins
  • Environment variables
  • Commands
  • Piping
  • Constructs
  • Other cool things

Tasks

  • Check PATH
  • Modify PATH
  • Find the present working directory
  • Open the man page explaining the FHS
  • Change to a different directory - using absolute paths, and using relative paths
  • List contents of present working directory (current only, recursively, tree)
  • Get information about files
  • Find files with a certain name
  • Find information about a text file - filetype, size, wc
  • View different portions of a text file
  • Copy different portions to a new file
  • Find files containing certain text
  • Download a file - https://www.gnu.org/licenses/gpl-3.0.txt, https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
  • Do some maths?
  • Special bash variables
  • Shortcuts (!!, ctrl r)
  • Get some hardware info
  • Peep at kernel logs
  • Look at what journalctl has?
  • Get some information on installed and available packages, and installed repositories - enable a repository using sed
  • Write a shell script?

Command pool

clear, exit, man, apropos, alias, which, info, echo, env, ls, tree, pwd, cd, pushd/popd, dir, locate, updatedb, find, cp, mv, rename, touch, mkdir, rmdir, rm, free, df, du, history, cat, tac, wc, head, tail, less, more, grep, sed, cut, tr, paste, ps, kill, uniq, sort, wget, bc, rsync, dmesg, lsusb, lspci, dnf, rpm, journalctl, sl, history, ctrl n, awk, fpaste, watch, for, if, &&, ||, chmod, diff, vimdiff, elinks, mpd, ncmpcpp, htop, iotop, top, nethogs, irssi, vim, emacs, gtypist

Additional resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment