RHCE 1: Linux Essentials. The following are the basic commands every newcomer to Linux should understand before building their repertoire on the way to becoming a Linux systems admin.
This post is logically the first in a series of posts to come, walking right around Linux, focussing on RedHat Enterprise Linux.
Connecting to a remote Linux System
telnet, ssh, rlogin
Listing the contents of a filesystem
ls -a Show hidden files also
ls -F Show file types i.e. / is a directory, * is a binary and @ is a symbolic link
ls -lh Show a long listing (contains permissions etc in a human friendly format)
ls -ld Show a long listing of directorys only (ignore files)
ls -R Show listing, recursing into subdirectories (large output can be expected)
ls -t Sort listing with newest first
ls -tr Sort listing with oldest first (reverse)
List users on the system
w The what command. Displays detailed user info like a combination of who and top for the specified user account
who Display logged in users
who am i Display info about your logged in user account who executed the command
whoami Display your username
logname Show the real username of logged in user (e.g. is su or sudo to another user account)
tty Display pseudo terminal that you’re logged into e.g /dev/pts/1
id Display UID for your user account (and gid)
groups Display groups your user account is a member of
Display information about the system
uname Display information about the operating system
-a -s -n -r -v -m -p -i -o
hostname Display hostname of the system (also used to set hostname)
date Displays time and date
/sbin/hwclock Display and set hardware clock
cal Display month calendar
uptime Display current time elapsed since initial booting, number of users logged in and load averages
top Display top running processes, Shift + M to sort my memory instead of CPU
Display information about commands
which Display the absolute path to the specified binary executed, e.g. which cat gives /bin/cat
whereis Display location of binary and location of man pages for specified binary
man Display manual page for specified command
man 1 Display user commands section of man page for specified command
man 4 Display special files section of man page for specified command
man 5 Display system configuration files section of man page for a given command
man -k or apropos Displays man pages sections pertinent to specified search keyword
passwd –help or passwd -? Displays quick help for passwd command or other command
whatis or man -f Displays description for config file or binary, e.g. whatis yum.conf gives Config file for yum package mgmt system