3 years ago
date – Show the current date and time
cal – Show this month's calendar
uptime – Show current uptime
w – Display who is online
whoami – Who you are logged in as
finger user – Display information about user
uname -a – Show kernel information
cat /proc/cpuinfo – CPU information
cat /proc/meminfo – Memory information
df -h – Show disk usage
du – Show directory space usage
free – Show memory and swap usage
Enter – Run the command
Up Arrow – Show the previous command
Ctrl + R – Allows you to type a part of the command you're looking for and finds it
Ctrl + Z – Stops the current command, resume with fg in the foreground or bg in the background
Ctrl + C – Halts the current command, cancel the current operation and/or start with a fresh new line
Ctrl + L – Clear the screen
command | less – Allows the scrolling of the bash command window using Shift + Up Arrow and Shift + Down Arrow
!! – Repeats the last command
command !$ – Repeats the last argument of the previous command
Esc + . (a period) – Insert the last argument of the previous command on the fly, which enables you to edit it before executing the command
Ctrl + A – Return to the start of the command you're typing
Ctrl + E – Go to the end of the command you're typing
Ctrl + U – Cut everything before the cursor to a special clipboard, erases the whole line
Ctrl + K – Cut everything after the cursor to a special clipboard
Ctrl + Y – Paste from the special clipboard that Ctrl + U and Ctrl + K save their data to
Ctrl + T – Swap the two characters before the cursor (you can actually use this to transport a character from the left to the right, try it!)
Ctrl + W – Delete the word / argument left of the cursor in the current line
Ctrl + D – Log out of current session, similar to exit
apropos subject – List manual pages for subject
man -k keyword – Display man pages containing keyword
man command – Show the manual for command
man -t man | ps2pdf - > man.pdf – Make a pdf of a manual page
which command – Show full path name of command
time command – See how long a command takes
whereis app – Show possible locations of app
which app – Show which app will be run by default; it shows the full path
grep pattern files – Search for pattern in files
grep -r pattern dir – Search recursively for pattern in dir
command | grep pattern – Search for pattern in the output of command
locate file – Find all instances of file
find / -name filename – Starting with the root directory, look for the file called filename
find / -name ”*filename*” – Starting with the root directory, look for the file containing the string filename
locate filename – Find a file called filename using the locate command; this assumes you have already used the command updatedb (see next)
updatedb – Create or update the database of files on all file systems attached to the Linux root directory
which filename – Show the subdirectory containing the executable file called filename
grep TextStringToFind /dir – Starting with the directory called dir, look for and list all files containing TextStringToFind
chmod octal file – Change the permissions of file to octal, which can be found separately for user, group, and world by adding: 4 – read (r), 2 – write (w), 1 – execute (x)
chmod 777 – read, write, execute for all
chmod 755 – rwx for owner, rx for group and world
For more options, see man chmod.
ls – Directory listing
ls -l – List files in current directory using long format
ls -laC – List all files in current directory in long format and display in columns
ls -F – List files in current directory and indicate the file type
ls -al – Formatted listing with hidden files
cd dir – Change directory to dir
cd – Change to home
mkdir dir – Create a directory dir
pwd – Show current directory
rm name – Remove a file or directory called name
rm -r dir – Delete directory dir
rm -f file – Force remove file
rm -rf dir – Force remove an entire directory dir and all it’s included files and subdirectories (use with extreme caution)
cp file1 file2 – Copy file1 to file2
cp -r dir1 dir2 – Copy dir1 to dir2; create dir2 if it doesn't exist
cp file /home/dirname – Copy the filename called file to the /home/dirname directory
mv file /home/dirname – Move the file called filename to the /home/dirname directory
mv file1 file2 – Rename or move file1 to file2; if file2 is an existing directory, moves file1 into directory file2
ln -s file link – Create symbolic link link to file
touch file – Create or update file
cat > file – Places standard input into file
cat file – Display the file called file
more file – Display the file called file one page at a time, proceed to next page using the spacebar
head file – Output the first 10 lines of file
head -20 file – Display the first 20 lines of the file called file
tail file – Output the last 10 lines of file
tail -20 file – Display the last 20 lines of the file called file
tail -f file – Output the contents of file as it grows, starting with the last 10 lines
tar cf file.tar files – Create a tar named file.tar containing files
tar xf file.tar – Extract the files from file.tar
tar czf file.tar.gz files – Create a tar with Gzip compression
tar xzf file.tar.gz – Extract a tar using Gzip
tar cjf file.tar.bz2 – Create a tar with Bzip2 compression
tar xjf file.tar.bz2 – Extract a tar using Bzip2
gzip file – Compresses file and renames it to file.gz
gzip -d file.gz – Decompresses file.gz back to file
/etc/rc.d/init.d/lpd start – Start the print daemon
/etc/rc.d/init.d/lpd stop – Stop the print daemon
/etc/rc.d/init.d/lpd status – Display status of the print daemon
lpq – Display jobs in print queue
lprm – Remove jobs from queue
lpr – Print a file
lpc – Printer control tool
man subject | lpr – Print the manual page called subject as plain text
man -t subject | lpr – Print the manual page called subject as Postscript output
printtool – Start X printer setup interface
ifconfig – List IP addresses for all devices on the local machine
iwconfig – Used to set the parameters of the network interface which are specific to the wireless operation (for example: the frequency)
iwlist – used to display some additional information from a wireless network interface that is not displayed by iwconfig
ping host – Ping host and output results
whois domain – Get whois information for domain
dig domain – Get DNS information for domain
dig -x host – Reverse lookup host
wget file – Download file
wget -c file – Continue a stopped download
ssh user@host – Connect to host as user
ssh -p port user@host – Connect to host on port port as user
ssh-copy-id user@host – Add your key to host for user to enable a keyed or passwordless login
adduser accountname – Create a new user call accountname
passwd accountname – Give accountname a new password
su – Log in as superuser from current login
exit – Stop being superuser and revert to normal user
ps – Display your currently active processes
top – Display all running processes
kill pid – Kill process id pid
killall proc – Kill all processes named proc (use with extreme caution)
bg – Lists stopped or background jobs; resume a stopped job in the background
fg – Brings the most recent job to foreground
fg n – Brings job n to the foreground
dpkg -i pkg.deb – install a DEB package (Debian / Ubuntu / Linux Mint)
rpm -Uvh pkg.rpm – install a RPM package (Red Hat / Fedora)
shutdown -h now – Shutdown the system now and do not reboot
halt – Stop all processes - same as above
shutdown -r 5 – Shutdown the system in 5 minutes and reboot
shutdown -r now – Shutdown the system now and reboot
reboot – Stop all processes and then reboot - same as above
startx – Start the X system
Cheat-Sheets.org – All cheat sheets, round-ups, quick reference cards, quick reference guides and quick reference sheets in one page. The only one you need.
Tutorial: The best tips & tricks for bash, explained – Linux Tutorial Blog / Quality Linux tutorials without clutter
LinuxCommand.org – Learning the shell, Writing shell scripts, Script library, SuperMan pages, Who, What, Where, Why
LinuxManPages.com – General commands, System calls, Subroutines, Special files, File formats, Games, Macros and conventions, Maintenence commands, Most Popular Man Pages
Linux Man Pages from die.net – Man pages are grouped into sections, to see the full list of Linux man pages for a section, pick one. Or you can browse Linux man pages by name; choose the first letter of the name of the Linux command, function, or file you are interested in.
Linux Newbie Guide: Shorcuts and Commands – Linux essential shortcuts and sanity commands; Common Linux commands - system info; Basic operations, network apps, file (de)compression; Process control; Basic administration commands, accessing drives/partitions; Network administration tools, music-related commands, graphics-related commands.
Sudo Manual Pages – Sudo (su "do") allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments. For more information, see the introduction to Sudo. Sudo is free software, distributed under an ISC-style license.
LinOxide.com – Linux Commands Cheat Sheet in Black & White
Thank you so much!
Signed a Linux Mint newbie.
Muito bom! Parabéns!!!
Very handy and much appreciated. Thank you
Very useful. Thank you.
thanks a lot this page helps me so much to use linux.
yes Very helpful. Thanks.
thanks, very useful
Excellent very useful
thanks ..excellent and helpful info
Thanks for that. i save that.
very helpfull for newbie , tnx
Excellent. Just what I needed, all info in one place. Thank you.
Muy buen aporte, a muchos les servirá bastante...
તમે આ માહિતી માટે ખૂબ આભાર, મારા એક મોટી સમસ્યા આદેશ વાક્ય સ્વીચો તમામ છે અને ઉચ્ચ અથવા નિમ્ન કિસ્સામાં ત્યાં અને / જ સંદર્ભમાં છે આદેશો દરેક માટે અર્થ જો. પણ નવા કાર્યક્રમો સ્થાપન .ડેબ .SH (કોમ્પ્રેસ્ડ tar.bz/bz2 GZ) ચલાવો.
ઓકે દેબ સોફ્ટવેર સેન્ટર પરંતુ બાકીના શું નાઇટમેર સાથે ખોલે છે.
મહાન ટ્યુટોરીયલ અને ખૂબ જ ઉપયોગી
I need it.
thanks! very useful to newbes like me
Very helpful tutorial! Thanks
Great reference. Thanks
Thank you for taking the time to teach others, this is a great big help to me. So thanks once again very very much appreciated
Well done! Tahnk you!!
Very well done!
Thanks a million!
type in terminal the line below and you will find you're distro flavor/info
No LSB modules are available.
Distributor ID: LinuxMint
Description: Linux Mint 17.2 Rafaela
A good reference.
very very interesting. thank you
I am new with Linux Mint... this your tutorial is cool and minimal soft...
Very helpful, thank you very much.
I cheat all the time
thanks for the nice tutorial..
little mistake: the tutorial is wrote by @alexio. Good wise guy ...
Another good tutorial by @clem. Go straigth foward !
Thank you for this so, so much. I was (Am) a noob in need, and this saved me. ;) Google is okay, but THIS is what I was looking for!
Thanks! Very nice stuff.
Very helpful, keep me going for ages, thanks. A newbie
common information, but here more compressed and more complete than elsewhere. Very helpful, thanks!
Thanks! Very nice information, Especially for beginners.
Thank you. Necessary information combined. Helpful for newcomers like me.
It would be good to add some disk commands like
although I'd not add gdisk till this msg is corrected;
"Found invalid GPT and valid MBR; converting MBR to GPT format
since it doesn't change the MBR unless specifically instructed to.
Can anyone explain how to remove the annoying authorise box popup every time i want to access a location, such as installing software for example. i am using Mint 17 Cinnamon.
Very good and informative.
Great info! Also thanks for the Recommended reading section much needed as well! Thanks much!!
This is very helpful. I love this site. Thanks for all the info.
Very useful. We need something like this aimed specifically at XP refugees. Do you know of one?
Important but missing is iwconfig and iwlist in the network section.
Great really liked it..
Thanks for this very good work!
I suggested this and was told that it was a stupid, and definitely was not an idea! I am glad to see someone finally created it. This is awesome! Thank You So Much!!!
love it !!!
Love this. Thank you so much. Also, thanks to linux_commands for the reference at http://www.linuxcommand.net
Man, I love this community.
Very usefull, thank you!
This is very helpful. Thanks.
useful resource, thanks!
This is very useful and thank you so much. This was a my major problem when I going to work - specially when I going to install software..... Again Thank you very much.
short and nice.
this is a great resource!
fantastic for a beginner! Thx
Nice Guide. Thanks
Thank you so much for this information, my one major problem is all of the command line switches and if there in upper or lower case and are of the same context/meaning for each of the commands. Also the installation of new applications .deb .sh (compressed tar.bz/bz2 gz) .run.
Ok deb opens with the software center but the rest what a nightmare.
Great tutorial and very helpful
Thanks for doing this for all of us. This helps to make linux mint a true community effort ..Thanks to this and other tutorials I got to where I am, using LMDE as my platform, and I am no longer looking for this sort of info as much as in the beginning. But that is exactly the point: These tutorials helped me and others to reach this point, where we use LM and its all working for us!!
im newbie and slow learner... tq for the tutorial... need to know basic command line and willin to learn...
Thanks a lot, this very helpful
Thank you, this is very useful!!!
Tks! Very useful reference... to bmrks!
thanks greatly bing search finds this article quickly...respectable.
Thank you, very useful.
Thank you :)
This will come in handy for sure! Promoted and subscribed.
Great tutorial for learning terminal commands.
Checking back here when i am stuck or want to try out something.
Thanks, alexio... May I translate that in french for some users ?
Nice list. I have used most of these, and I have to say for the most part, the man pages are the most helpful. Let me suggest a couple others (I use these often);
sudo and gksudo - run something as a superuser (cli and gui)
NOTE: add an ampersand after a command to have it run in the background and return the shell to the user, example "gksudo gedit [filename] &"
history - this gives you a numbered list off all previously typed commands, then to repeat one of the commands just enter !123 or whatever number it is. Goes along with !! and up arrow key...
less [filename] - From man page - less is a program similar to more (1), but which allows backward movement in the file as well as forward movement.Also, less does not have to read the entire input file before starting.
nano - simple text editor in the terminal (easier than vi or emacs)
mount - mount something somewhere, very handy...
dmesg - get system messages, stuff like "dmesg |tail" helps after inserting a usb device such as a flash drive to see what's up with it
nslookup - query Internet name servers interactively
keyboard shortcut to switch terminals - CTRL+ALT+F1 thru F7, F7 is your normal GUI tty7, but in case you need a full-screen terminal you can switch and login to F1, F2, etc
apt version [package] - see the version of an installed package
for df, I suggest "df -h" it makes it more human readable
md5sum - print or check md5sums (man md5sum), also sha1sum, etc.
"sudo fdisk -l" lists the partition tables for all of your devices then exits
chown - change ownership of a file, sometimes helpful
See the new Tron? It was cool how they used whoami and ps axu and stuff.
Remember the TRS-80/DOS command tron? A debugging command it means trace on, troff turns it off.
Get linux man pages in a nice web browser format by visiting http://linux.die.net/man/
Nice tutorial, but when compiling from source, yo should read the supplied readme file as it is almost but not quite always as simple as configure, make, make install
ok, what would I use to get it to find trackers
I downloaded both the deb and the tar files, because I wasn't sure which one to use, as some programs use tar and others use deb. When I try to install it again, it says already installed and asks if I want to re-install, which I tell it yes.
I also tried it without the dash between sudo and avgctl, and it still told me not found.
I did the sudo-avgctl in the terminal and it says not found
@DJ_KIM - After installing AVG Anti-Virus Free Edition for Linux (the DEB file is about 93.5 MB), use the Terminal command "sudo avgctl" (without quotes) and reboot your system to ensure that AVG related services (a.k.a. daemons) start properly.
After the system reboot, open the terminal and issue the command "sudo avgupdate" (without quotes) to update the AVG Anti-Virus definition files.
After the update is completed, issue the command "sudo avgscan / -a -H -c" (without quotes) at the terminal to perform a full Anti-Virus scan on your system.
The above command scans all files in your system. The option ‘-a’ instructs the AVG Anti-virus scanner to scan the compressed archive files too. The option ‘-H’ instructs the scanner to use heuristics while scanning. The option ‘-c’ instructs the scanner to scan cookies too.
Reference used: How To Install And Use AVG Antivirus In Linux Mint / Ubuntu
I have a Linux with Mint on it. I just installed AVG for Linux on it, and now I can't find it. Any suggestions as to where I might be able to find it on the computer? I can find the folder where it was downloaded to, and I can install it and re-install it, but I can't find it to run it. Please help.
Kim (newbie here)
Thanks this will definatly be handy!
Thanks for writing this. I'm new to linux and have the goal of learning something about this OS everyday. So far, I love it. It's a challenge when all you've ever done is windows. In some ways it's so much easier than windows and in some ways it's driving me insane. I'll get there though. It's so impressive that my old compac evo N610c was trashable as far as windows OS but with linux, it's got new life and will be a viable product for years. I've bought a wireless card and am going to install another stick of 512MB ram to get a gig but it's running at a respectable rate now for the age of the box. Thanks to everyone out there who write tutorials, reply in chat and work on the apps for making linux. It's the most impressive community I've ever found online.
dude, how about the "sudo" and its sub commands?BTW, thank u for this ref.
I like this, thx
thanks big help
I just want it thanks a lot.
Great tutorial! Thank you so much!
Exactly what I was searching for :)!
Way cool! Just enough to keep the average user going without overload.
Thanks, perfect for a beginner like me.
Awesome! Definitely bookmarking this tutorial!
Amazing tutorial! Helped me a lot, thanks!
Very good tutorial
Very Good job! (y)
Thanks, very helpful...
Nice!!! Exactly what I was looking for. Excellent reference for the terminal.
this is what I need, many thanks...
Many THANX, again something useful. GR8
Ur the Man Alexio ! Kool Beenz home skillet !
Impressive... I'll keep a printout on my desk.
Thanks Alexio for compiling this list!
Thanks, very helpful.
I've been looking for this! Thanks Alexio!
At my age, the whoami command is very useful.
This is kool beenz just like high school i've got a cheat sheet ! Thanx Lex