John's Useful Ubuntu Commands Mega-Thread - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Computer Support Topics (https://www.supportforums.net/forumdisplay.php?fid=4) +---- Forum: Linux, FreeBSD, and Unix (https://www.supportforums.net/forumdisplay.php?fid=17) +----- Forum: Ubuntu Support (https://www.supportforums.net/forumdisplay.php?fid=61) +----- Thread: John's Useful Ubuntu Commands Mega-Thread (/showthread.php?tid=869) |
John's Useful Ubuntu Commands Mega-Thread - John - 10-09-2009 John's Useful Ubuntu Linux Commands Sticky? cd Change the working directory. Quote:$ cd /bin chgrp Change group ownership of files. Quote:$ chgrp games moo.txt chmod Change access permissions of files. Quote:$ chmod +x helloworld chown Change file owner and group. Quote:# chown root lorem.txt cksum Print CRC checksum and byte counts of each file. Quote:$ cksum lorem.txt moo.txt Quote:3570240675 453 lorem.txt cp Copies a file. Quote:$ cp lorem.txt copy_of_lorem.txt date Outputs the current date and time. Quote:$ date Quote:Sat Mar 3 12:07:09 GMT 2007 df Reports the amount of disk space used and available on filesystems. Quote:$ df dir List directory contents. Quote:$ dir Quote:copy_of_lorem.txt lorem.txt moo.txt www du Estimate file space usage. Quote:$ du -h /bin Quote:7.8M /bin echo Display a line of text. Quote:$ echo foobar Quote:foobar exit Cause the shell to exit. Quote:$ exit fgrep Print lines matching a pattern in a file. Quote:$ fgrep "irure dolor" lorem.txt find Search for files in a directory hierarchy. Quote:$ find hello* Quote:hello_world free Display amount of free and used memory in the system. Quote:$ free grep Print lines matching a pattern. Quote:$ grep -i apple fruitlist.txt Quote:apple groups Outputs the user groups of which your account belongs to. Quote:$ groups Quote:games users head Output the first part of files. Quote:$ head -2 lorem.txt hostname Outputs the machines hostname on the network. Quote:$ hostname Quote:Johns-Box id Outputs user id, group id, and groups of your account. Quote:$ id Quote:uid=1478(smallfoot) gid=100(users) groups=35(games),100(users) kill End a process. Quote:$ kill -9 18298 Quote:-bash: kill: (18298) - Operation not permitted killall Kill processes by name. Quote:$ killall irssi Quote:irssi(18298): Operation not permitted last Show listing of last logged in users. Quote:$ last -n 3 ln Make links between files. Quote:$ ln -s data.txt symlink.txt logname Print user's login name. Quote:$ logname Quote:smallfoot ls List directory contents. Quote:$ ls Quote:copy_of_lorem.txt lorem.txt moo.txt www man Opens the manual page for a software or function. Quote:$ man bash md5sum Outputs the MD5 hash sum of a file. Quote:$ md5sum lorem.txt Quote:56da9e37259af34345895883e6fd1a27 lorem.txt mkdir Makes a directory. Quote:$ mkdir foobar mv Moves a file. Quote:$ mv lorem.txt ipsum.txt nl Number lines of files. Quote:$ nl lorem.txt nm List symbols from object files. Quote:$ nm hello_world od Dump files in octal and other formats. Quote:$ od -t x /bin/sh Quote:2376640 00098020 000054d4 00000000 00000000 pidof Find the process ID of a running program. Quote:$ pidof fetchmail Quote:22392 ping Pings a host. Quote:$ ping -c 2 127.0.0.1 Quote:PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data. ps Outputs running processes. Quote:$ ps pstree Display a tree of processes. Quote:$ pstree pwd Outputs the name of current working directory. Quote:$ pwd Quote:/home/smallfoot rm Removes a file or directory. Quote:$ rm lorem.txt rmdir Removes a directory. Quote:$ rmdir foobar sed Stream editor for filtering and transforming text. Quote:$ echo "My cat's name is Bob" | sed -e 's/Bob/Mittens/g' Quote:My cat's name is Mittens sha1sum Outputs the SHA1 hash sum of a file. Quote:$ sha1sum lorem.txt Quote:c942ddebd142ec8bacac9213d48096e74bab4957 lorem.txt shutdown Bring the system down in a secure way. All logged-in users are notified that the system is going down. Quote:$ shutdown now size List section sizes and total size. Quote:$ size /bin/bash stat Outputs file status. Quote:$ stat lorem.txt strings Print the strings of printable characters in files. Quote:$ strings hello_world tail Output the last part of files. Quote:$ tail -2 lorem.txt talk Talk to another user. Quote:$ talk bob Lookout for the dopefish! touch Change a file's access and modification timestamps. If file does not exist, create it. Quote:$ touch lorem.txt tty Outputs the name of the current terminal. Quote:$ tty [/QUOTE]/dev/pts/16[/QUOTE] uname Outputs operating system, hostname, kernel version, date and timp, and processor. Quote:$ uname -a Quote:Linux Johns-Box 2.6.9 #1 SMP Wed Jul 19 16:24:18 MSD 2006 i686 Intel® Xeon CPU 2.80GHz GenuineIntel GNU/Linux uptime Outputs the system uptime. Quote:$ uptime users Print the user names of users currently logged in to the current host. Quote:$ users[/QUOTE]alice bob charlie eve[/QUOTE] vdir List directory contents. Quote:$ vdir w Show who is logged on and what they are doing. Quote:$ w wall Send a message to everybody's terminal. Quote:$ wall next week we change the server for a new one wc Counts lines in a file. Quote:$ wc -l lorem.txt Quote:7 lorem.txt whatis Search the whatis database for complete words. Quote:$ whatis bash who Outputs who is currently logged into the system. Quote:$ who whereis Locate the binary, source, and manual page files for a command. Quote:$ whereis bash Quote:bash: /bin/bash /etc/bash /usr/share/man/man1/bash.1.gz whoami Outputs your username / the name of your account. Quote:$ whoami RE: John's Useful Ubuntu Commands Mega-Thread - Crow - 10-09-2009 fortune RE: John's Useful Ubuntu Commands Mega-Thread - Acekidd01 - 10-09-2009 Good commands, but one questions. The second quote you put in each command means they are like an example of how to do it or a different command with a similar result? RE: John's Useful Ubuntu Commands Mega-Thread - M0GST3R - 10-09-2009 Great post thanks, learning these now in college,cleared a few things up for me. RE: John's Useful Ubuntu Commands Mega-Thread - John - 10-10-2009 (10-09-2009, 03:52 PM)Acekidd01 Wrote: Good commands, but one questions. Most are examples of what happens when you run the command. RE: John's Useful Ubuntu Commands Mega-Thread - Gone - 10-10-2009 ps|aux One of the ones i use the most. RE: John's Useful Ubuntu Commands Mega-Thread - Linux - 10-11-2009 Good post. I personally have a handbook with most of the linux commands in but this will be useful for beginners to the terminal. |