Warning: count(): Parameter must be an array or an object that implements Countable in /home/mikestec/public_html/ubuntu-antenna/wp-content/plugins/wordpress-ping-optimizer/cbnet-ping-optimizer.php on line 533

Miscellaneous Ubuntu Linux Commands

Misc. Ubuntu Commands

Misc. Ubuntu Commands

Here is a list of miscellaneous Ubuntu Linux commands that are used often.

 

Command Parameter Description
cp Copy files. Syntax: cp filename destination
cp -R Copy files, including files in subdirectories
df Display empty disk space
du Display how much disk space files and directories occupies in bytes
dmesg Displays the hardware information you see during the bootup sequence.
du -h Display how much disk space files and directories occupies in K or MB
find Find files in the current directory. Syntax: find path filespec
find -iname Find files, ignoring case, by searching all subdirectories. Syntax: find path -iname filespec
find / -iname “*filespec*” will search the whole disc for any files with names including the filespec, ignoring case.
find -name Find files by searching all subdirectories. Syntax: findpath -name filespec
find -prune Find files but not directories. Syntax: find path -prune -name filespec
free Displays your memory usage.
grep -i Search for a textstring in a file, case unsensitive. Syntax: grep -i searchstring filespec
grep -l Search for a textstring in a file, only showing filenames. Syntax: grep -l searchstring filespec
head filename display first ten lines of file. Syntax: head file
kill -1 Restart a process. Syntax: kill -1 processid
kill -9 Brutaly kill a process. Syntax: kill -9 processid
kill -15 Stop a process. Syntax: kill -15 processid
less Show the content of a file
ls List files
ls -a Lists all files, including hidden files
ls -l Lists all files using a long format
mkdir Make a directory
mv Move files. Syntax: mv filename destination
ps Show active processes
ps -a Show all users active processes
ps -u Show owner and starttime for the active processes
ps -au show all users’ active processes and owners of processes
pwd Show the name and path to the current directory
rm Remove files
rm -f Remove files without asking first
rm -r Remove files, including files in subdirectories
rmdir Remove an empty directory
rmdir -p Remove an empty directory, including empty subdirectories
su Switch user. Syntax: su user. Just su will ask for the root password
su Switch to root and get roots environment and paths
tail filename Displays the 10 last lines in a file Syntax: tail file
talk Chat with another user. Syntax: talk user.
top Continuously displays your processes, CPU usage and memory usage.
uptime Tells how long linux has been running
whatis Tells what a program really does. Syntax: whatisprogram. Run makewhatis as root to creat database.
whereis Searches for a file. Syntax: whereis filename