Often used Ubuntu Linux Commands

Linux OS Topics
Post Reply
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Often used Ubuntu Linux Commands

Post by Neo » Wed Sep 02, 2009 3:27 am

Miscellaneous Ubuntu Linux Commands
CommandParameterDescription
cpCopy files. Syntax: cp filename destination
cp-RCopy files, including files in subdirectories
dfDisplay empty disk space
duDisplay how much disk space files and directories occupies in bytes
dmesgDisplays the hardware information you see during the bootup sequence
du-hDisplay how much disk space files and directories occupies in K or MB
findFind files in the current directory. Syntax: find path filespec
find-inameFind 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-nameFind files by searching all subdirectories. Syntax: find path -name filespec
find-pruneFind files but not directories. Syntax: find path -prune -name filespec
freeDisplays your memory usage.
grep-iSearch for a textstring in a file, case unsensitive. Syntax: grep -i searchstring filespec
grep-lSearch for a textstring in a file, only showing filenames. Syntax: grep -l searchstring filespec
headfilenamedisplay first ten lines of file. Syntax: head file
kill-1Restart a process. Syntax: kill -1 processid
kill-9Brutaly kill a process. Syntax: kill -9 processid
kill-15Stop a process. Syntax: kill -15 processid
lessShow the content of a file
lsList files
ls-aLists all files, including hidden files
ls-lLists all files using a long format
mkdirMake a directory
mvMove files. Syntax: mv filename destination
psShow active processes
ps-aShow all users active processes
ps-uShow owner and starttime for the active processes
ps-aushow all users' active processes and owners of processes
pwdShow the name and path to the current directory
rmRemove files
rm-fRemove files without asking first
rm-rRemove files, including files in subdirectories
rmdirRemove an empty directory
rmdir-pRemove an empty directory, including empty subdirectories
suSwitch user. Syntax: su user. Just su will ask for the root password
su-Switch to root and get roots environment and paths
tailfilenameDisplays the 10 last lines in a file Syntax: tail file
talkChat with another user. Syntax: talk user
topContinuously displays your processes, CPU usage and memory usage
uptimeTells how long linux has been running
whatisTells what a program really does. Syntax: whatis program. Run makewhatis as root to creat database
whereisSearches for a file. Syntax: whereis filename
Floppy Disk commands
To mount in DOS modemount -t msdos /dev/fd0 /mnt/floppy
To copy to hard drivecp /mnt/floppy/FILENAME /PATH/FILENAME
To unmount floppy driveumount /mnt/floppy
Post Reply

Return to “Linux”