Install Linux & Basic Commands - Ch1 Flashcards
List popular Linux distributions
Enterprise Linux:
- Red Hat Enterprise Linux (RHEL)
- Oracle Linux
- CentOS - Community Enterprise Oper Sys
- Scientific Linux
- Fedora
- Debian Linux: Comm pwrd, supports mult vendor hdwr
- Ubuntu Linux: Debian spinoff
- SUSE Linux: Commericial
- OpenSUSE Linux: Comm driven
The Linux command prompt consists of what?
username
Linux system name
Current directory
Dollar sign $: default shell sign indicating a regular user
Centos command prompt is slightly different and enclosed within square brackets
What is the basic syntax of the Linux command?
command;
option (switch);
argument (files & other data)
A Linux command option is often preceded by what?
A hyphen
ls
Lists files and directories
pwd
Print working directory : Displays curr location in dir tree
cd
Change dir
cd /
Switch to the root dir
cd -
Cmd switch to previous dir
cd ..
Move up to parent dir
tty
Cmd display terminal name you are currently running commands in
uptime
Show sys curr time, how log it has been up, no of users logged in, avg no of processes over last 1, 5, and 15 min
whoami
View user login name
logname
Login name; shows name of real user originally logged in to sys
id
Displays: user id (UID); user name; group id (GID); secondary group ids
groups
Lists all groups a user is a member of
uname
Displays OS name.
uname -a
Display OS name with details
hostname
Display system hostname;
Ex… centos73
clear
Clears terminal screen
gzip
Creates a compressed file of each specified files;
Adds .gz extension to each file;
Faster with compression ratio, but not as good as bzip2
gzip options;
- r
- l
-r
Compresses entire directory tree
-l
Instructs the command to display uncompressed filename
gunzip
Used to decompress .gz files;
Can also use gzip -d to decompress;
bzip2
Creates compressed file of each specified file;
Adds bz2 extension
bzunzip2
Decompresses bzip2 compressed files
xz
Compress files with better compression ratio, but slower than gzip or bzip2;
Adds .xz extension to compressed files
unxz
Uncompress files compressed with xz;
Can also use xz -d to uncompress
tar
Tape archive;
Create, append, update, list and extract files or dir tree to form a single tar file
man
View manual pages
man -k
Search man pages for keyword following -k
–help
Display man pages of command following “–help “
whatis
Display short description of a command or file in man database
cpio
Copy in/out;
Copy, list and extract files to and from a single archive file