Useful Linux Commands
// December 18th, 2008 // No Comments » // Commands, General, Howto, Linux, Technology
[digg=http://digg.com/linux_unix/Useful_Linux_Commands]
Here I have compiled a fairly short list of useful terminal commands. Most of these I use on a daily basis to administer my Linux box, some of them are just for fun or to find out useful information about your Linux box. If I missed a command you would like to have added, leave me a comment.
How to read this list:
System Information <—– The Command Category
Find the Process ID of a running program <—– Description of the command
-
pidof program <—– The terminal command (Italic means to insert your own value)

System Information
Show system uptime
-
uptime
Show computer stats
-
lspci
Show a list of all running processes
-
ps aux
Kill a process using the PID (Process ID)
-
kill PID
Find the Process ID of a running program
-
pidof program
Killing a process by name
-
killall program
View the current time, date, and year
-
date
Find the processor architecture
-
arch
Show the amount of disk space in use and available on the system
-
df
Show amount of free and used memory in the system
-
free
Show hostname of the machine on the network
-
hostname
Show operating system, hostname, kernel version, date, time, and processor
-
uname –a
Show the username of the current account
-
whoami
Modify Files
Change the access permissions of a file
-
chmod +x /where/the/file/is
Change the owner and group of a file
-
chown newowner /where/the/file/is
Copy a file
-
cp /original/file /new/location/of/file
Move a file
-
mv /original/location/file /new/location/file
Remove a file
-
rm /directory/file
Modify Directories
Make a directory
-
mkdir /new/directory/
Remove directory
-
rmdir /directory/to/remove/
Interact With Terminal
Clear the terminal window
-
clear
Change the working directory of the terminal
-
cd /new/directory/
List the contents of the current directory
-
ls
Exit the terminal
-
exit
Search for files
-
find filename
Interact With The System
Shutdown the system
-
shutdown now
Talk to another user on the system
-
talk USERNAME message to user
Read your fortune
-
fortune




