This article was published more than a year ago, there may have been developments.
Please take this into account.

Like many other things, also command line is subject to mutations. Mutations that occur very slowly (fortunatamennte) and in some cases do not occur just. The one listed below is a beginner cheatsheet of linuxian, i main controls with which to familiarize when you start to use the (one of) free operating system. Obviously, the guide is not complete, In fact, this little guide is not intended to replace all “man page” (otherwise a person would need?), but want to summarize in a practical and fast the most common commands.

Working with Files
ls Lists the current directory condenuto
ls -R List subdirectories recursively
ls -a List all contents, including hidden files
ls-l Lists the contents and information on permissions and ownership
pwd Shows the path of the current directory
cd directory1 Log in “directory1”
cd Back alla $ HOME
cd .. Exits from the current directory and is positioned in the parent directory
cd – Return to the directory you just left
cp /path/to/source /path/where/destination/is Copy the file /path/to/source in the directory /path/where/destination/is
cp -r /path/to/source /path/to/destination Copy a directory recursively from /path/to/source a /path/to/destination
mv source destination Move (and rinomina) a file from source a destination
rm file1 Removes file1
rm -f file1 Removes file1 without confirmation
rm -r folder Remove a directory folder and its contents recursively
mkdir directory name Create a new directory called foldername
rmdir foldername Removes an empty directory
file file1 Shows the type of file, of file1
cat file1 file2 Adds the contents of file2 at the end of file1
cat > file1 Insert the console output within file1
less file1 Show inside the console the contents of file1
head file1 Show the first 10 rows of the content of file1
tail file1 Show last 10 rows of the content of file1
chmod 777 file Change the permission of file in 777
chown user:group file Change the owner and group membership file
ln -s source /path/to/destination Create a symbolic link file source in /path/to/destination
Encrypt and compress
gpg -c file Crypt file
gpg file.gpg Decrypt file.gpg
tar -cf archive.tar foo bar Create archive archive.tar inserting files foo and bar
tar -xf archive.tar Extract all files from the archive archive.tar
gzip file1 Compress file1 and renames it file1.gz
gzip-d file1.gz Uncompresses file1.gz
System commands
uname -a Show the system and the kernel in use
head -n1 /etc/issue Shows the distribution installed
mount Shows the currently mounted filesystems
date Show the system date
uptime Show uptime (how long the computer is turned on)
whoami Show your username in use
in Show users logged on to the computer
man command See the manual for the command command
!! Repeat Last Command launched
exit Exits from the current session
  A click in the URL bar of Firefox to highlight any address
grip pattern file Search for a regular expression (pattern)inside file
grep -i Search regardless of lower / upper case (case insensitive)
grep-r Recursive search
grep-v Search reversed
grep-o Shows the parts common to multiple files
locate file1 Displays the location of file1
whereis command View the installation path / source / the man page for the command command
Process Management
ps Shows a snapshot of running processes
top Show processes running in real time
kill pid Kill a process with a given pid
pkill name Terminate a process by process name
killall name Terminates all processes that begin with name
df-h Displays the free space in the filesystem
to-h folds Show the dimensions used in the directory folder
du-sh folder Show the total size of the directory folder
fdisk-l Show the partitions sizes and types (when run as root)
free Show the memory and the use of swap

These commands are translated from site “” (literally “make technology easier”), who has done a commendable job of selecting the most used commands.

Categories: GNU/LinuxShellTips


I keep this blog as a hobby by 2009. I am passionate about graphic, technology, software Open Source. Among my articles will be easy to find music, and some personal thoughts, but I prefer the direct line of the blog mainly to technology. For more information contact me.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.