Introduction to Linux & the Command Line Flashcards
What is the history of Linux? Who created it?
Created by Linus Torvalds
1991
Student in Finland
So who combines GNU with Linux?
Red Hat Canonical Debian Slackware Linux Family Tree (https://distrowatch.com/dwres.php?resource=family-tree)
Which distributions should we be familiar with for the exam?
CentOS
Ubuntu
How do we access the command line interface?
Boot direct to console Terminal software: XTERM Konsole Gnome Terminal
Is the CLI the same on all Linux distros?
/bin/sh -Generally links to another shell Red Hat / CentOS -/bin/bash Ubuntu -/bin/dash
How do we execute commands in the CLI?
Typing them into the terminal. *Single commands ls history *Options/Arguments uname uname -a shutdown -h now
What are some common commands we may use?
ls mkdir cd pwd echo touch cp
Can we edit files from within the CLI?
YES
- View
- cat
- more
- less
- Edit
- vim
- nano
- gedit
Are there any other tips or tricks for the CLI?
Tab auto-complete
When do we need super user privileges?
System-wide changes
Changes that affect other users
Configuring some services
What is the easiest way to access super user privileges?
*su Substitute user *su - Switch to root - loads normal environment *su - (username) Switch to user
Function: Change user ID or become superuser
What if I just want to perform a single command?
*sudo
Executes command as root
Password cached for five minutes by default
Who is allowed to use the sudo command?
Administrators
*Users must be authorized to run sudo
In some distros (like Ubuntu) simply add ‘sudo’ group as a
secondary group
In others (like Red Hat) you must create your own group and
add it to /etc/sudoers
visudo =
dpezet ALL=(ALL)
What command allows users to securely edit files?
- sudoedit
- Useful when editing a single write-protected file
- sudoedit /etc/hosts
What does bash stand for?
Bourne Again Shell