COMMAND |
|
DESCRIPTION |
man
-k "<search string>" |
- |
Searches
the man pages for the <search string specified>, good for when
you don't 100% know what your looking for. |
ifconfig |
- |
This
lists all the ethernet adapters and there details including the IP
addresses and base addresses. |
ifup <eth#> |
- |
Bring an ethernet interface (eth#) up. |
ifdown <eth#> |
- |
Take an ethernet interface (eth#) down. |
rpm
-ivh <filename.rpm> |
- |
Installs
a program from an RPM package to its default install directory. |
rpm
-u <filename.rpm> |
- |
Updates
a program from an RPM package to its default install directory. |
mount
-t iso9660 /dev/cdrom /mnt/cdrom |
- |
Mounts
a CDROM drive in the ISO9660 format so that it can be accessed through
/mnt/cdrom |
pump
-h <hostname> -i eth0 |
- |
This
is a built in DHCP client program for Red Hat 6.2, it establishes
and IP address from your <hostname> and assigns it to your ethernet
interface eth0 so that you can connect to the net through your cable
connection. |
gunzip
<filename.gz> |
- |
Uncompresses
an GZIP file so that it can either be used or untared. |
gzip
<filename> |
- |
Compresses
a tar file so it can be stored to transferred easily. |
tar
-xvf <filename.tar> |
- |
This
extracts all files and directories from a TAR compresses file into
its default directory in your current working directory. |
tar
-xzvf <filename.tar.gz> |
- |
Extras
all the files from a tarball (a TAR file that is also GZIP'ed). This
allows a single command to do both extractions. |
tar
-cf <filename.tar> /<directory>/* |
- |
This
will create a new TAR file with the name specified by <filename.tar>
which will contain all the files in the <directory> and all
sub-directories. (You can then GZIP it) |
samba
{start|stop|restart|status} |
- |
This
runs or stops the SAMBA service which allows Windows machines to see
and browse your Linux computer. |
locate
-u |
- |
This
updates the locate database so that you can have up to date search
information. Same as updatedb, must be run as root. |
locate
<filename> |
- |
This
will list all directories for which your search <filename> is
located in. |
alias
name="execute_string" |
- |
This
aliases a command <name> to an executable string, e.g. alias
cdrom="mount -t ......" would allow easy mounting of the
CD-ROM drive by simply running the cdrom command. |
rm
-rf <directory> |
- |
This
removes a <directory> and all its contents without prompting
for confirmation on each file (be careful with this). |
du
-c -h |
- |
This
calculates the total amount of disk space used up on your Linux box
in human readable format, i.e. MB / GB etc. |
<command>
> /dev/null |
- |
This
executes a <command> and redirects all its output to the null
device and hence displays nothing on the screen. |
<command>
>> <filename> |
- |
This
executes a command and redirects it to append to a file given by <filename> |
chmod
<options> <filename/directory> |
- |
Changes
the READ / WRITE / EXECUTE permissions of a file or directory based
on USER / GROUP. |
chown
<user> <filename/directory> |
- |
Similar
to the above, but it changes the owner of the file to <user>. |
chgrp
<group> <filename/directory> |
- |
Once
again similar to above, changes the the group if of a file or directory
to that of <group>. |
man
<command> |
- |
Displays
the manual entries for the given <command>, is very useful for
finding out all the options of a command. |
<command1>
| <command2> |
- |
This
is the PIPE command and allows the output of the <command1>
to become the input of <command2>. |
pwd |
- |
Lists
the full directory path of your current working directory. |
passwd |
- |
Allows
the current user to change their password. |
adduser
<options> |
- |
Allows
the root (superuser) to add another authorized user to the database
of users for your Linux box. (/etc/passwd) |
groupadd
<options> |
- |
Allows
the root (superuser) to add another authorized group to the database
of groups for your Linux box. (/etc/group) |
su |
- |
Prompts
the current user for the superuser password, if correct they are given
all root privileges. This is useful when logging into your server
from a remote terminal as you can only login as root from the box
itself. |
shutdown
-h -t 30 now "message" |
- |
This
sends the "message" out to all terminals and shuts down
the box after 30 seconds from the time you hit enter, the -h means
that it will halt otherwise you can select a reboot option, this is
especially good if you have an ATX motherboard as it will auto power
off once the system has halted. |
cat
<filename> | more |
- |
This
will display the contents of the file <filename> and then PIPE
it to a command called more which will display it one screen at a
time so you can read it easily. |
[TAB]
Key |
- |
Command
completion, The golden key it will work out what the rest of your
command is from the options it has available. |
ls
-al |
- |
Lists
files for the current directory, showing permissions groups and owners. |
cp
[source] [target] |
- |
Copy
a file to another location, this can also be used to copy multiple
files and directories at once. |
ps
aux |
- |
Displays
all current running processes and programs. This will include the
system and other users processes. |
kill
[-9] [processes id] |
- |
Kills
specified processes, this is good for a program that you want to shut
down immediately. Use -9 to force stubborn program to die.. |
kill
-1 -1 |
- |
This
will kill all of your tasks, good for if you have a Telnet session
crash and processes are still running. |
killall
<program name> |
- |
If
you want to kill a program from a script then you will need this,
it will find the appropriate PID and terminate the program. |
pidof
<program name> |
- |
Can
be used to find the PID of a certain program that is running on your
machine. |
df |
- |
Calculates
the amount of free disk space for all mounted drives on your system. |
ln
-s <folder> <linked folder> |
- |
This
creates a symbloic link from the <linked folder> to the <folder>,
this means it you can use <linked folder> and it will really
be <folder>. |
fsconf |
- |
Filesystem
configuration utility (makes changes to the /etc/fstab file). |
lpdconfig |
- |
A
print-spooling configuration utility. |
netconf |
- |
A
TCP/IP services configuration utility. |
linuxconf |
- |
Comprehensive
interface for administering your Red Hat system. |
userconf |
- |
User
and Group configuration utility. |
xconf |
- |
X11
configuration utility. |
ntsysv |
- |
Used
to configure what services are started at boot time. |
scp
-r username@ip_address:path/to/* . |
- |
Secure copy
(remote copy program). Uses SSH encryption to transfer files between
systems (requires user account permisssions etc). |
find ./ -name <file_name> |
- |
If you can't use locate, then find is a more standardised Linux search program. |
dmesg |
- |
Print or control the kernel ring buffer, best way to monitor boot up messages by the Linux kernel and anylse to find problems etc |
lsmod |
- |
Shows the status of modules loaded with the Linux kernel (useful for seeing if your drivers (if modules) are loaded and working etc) |
modprobe |
- |
Program to add or remove modules from the Linux kernal (use this to add or remove your device drivers/modules). |
who |
- |
Lists who is currently logged into a Linux system, detailing username, connect method, date connected and IP address information. |
top |
- |
Provides a dynamic real-time view of a running system, use this as part of your system performance analysis. |
lsof |
- |
Lists all open files belonging to all active processes. |
vi |
- |
vi is a powerful text editing application that can be scripted, add modules and increase functionality, its a *must* for all Linux users. |
shred |
- |
Securely deletes a file by overwrite its contents |
arp |
- |
Manipulates the systems kernal ARTP cache, used mainly for clearing or updating the systems address mappings. |
head -n # <filename> |
- |
Output the first part of files, where the options such as -n are used it will display only # number of lines etc (man head for more info) |
tail -n # <filename> |
- |
Output the last part of files, where the options such as -n are used it will display only # number of lines etc (man tail for more info). |
nice |
- |
Runs a program with modified scheduling priority, i.e. a higher or lower priority to that of a normal process, guarantees more cpu time. |
nohup |
- |
Run a command immune to hangups, with output to a non-tty. |
stty |
- |
Change and print terminal line settings. Change the way your terminal sessions act or behaves to better suit you as a user. |
talk |
- |
Talk to another user currently logged in (doesn't matter which machine logged into as long as the usernames remain the same). |
!! |
- |
To automatically re-display the last command you typed at the prompt, type: !! and press enter. |
diff |
- |
Find the difference between two files, great for checking files (particularly code or configs) to see where they differ etc. |
screen |
- |
Allows you to run programs in a re-attachable virtual terminal. |
mc |
- |
Powerful filemanager that can browse rpm, tar, ftp, ssh, etc |
hwclock |
- |
Hardware Clock date/time, without arguments displays hardware date/time info, with --systohc will sync system to hardware |
chkconfig |
- |
Updates and queries runlevel information for system services |
TOP |