Useful Linux commands

Useful Linux commands
Even though there are many websites hawking similar content, with varying degree of clarity and quality, I want to offer a short, easy-to-use guide to some of the most common yet highly useful commands that could help make your Linux experience more joyful.
Now that you have read some of my installation guides, you have probably setup your system and configured the basic settings. However, I'm positive that some of you must have encountered certain difficulties - a missing package, a missing driver. The initial effort required of a Linux novice can appear daunting, especially after many years of Windows discipline.
Therefore, this article was born, in order to offer simple solutions to some of the more widespread problems that one might face during and immediately after a Linux installation. It is intended for the beginner and intermediate users, who still feel slightly uncomfortable with meddling in command line, scripts or configuration files.
This article will refer to Debian Linux distribution as the demonstration platform. However, all of these commands will work well with many other Linux distributions, with only small changes in syntax, at most. I have personally tested and used all of the commands and configurations in both Debian-based and RedHat-based distributions with success.
Maybe the command line isn't your favorite place to hang out, but to be an effective Linux admin, you need to be able to wield a few essential commands.
Let's see some useful Linux commands

Let's see some useful Linux commands

Change the working directory
master@ctnb1:~$ cd /usr/src/

Reporing the amount of disk space used and available on filesystems
zebra656:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 873G 82G 747G 10% /
tmpfs 3.8G 0 3.8G 0% /lib/init/rw
udev 3.8G 112K 3.8G 1% /dev
tmpfs 3.8G 0 3.8G 0% /dev/shm
/dev/sda1 473M 16M 433M 4% /boot
/dev/sdb1 917G 200M 871G 1% /mnt/disk1
Creating a file in the current directory
master@ctnb1:~$ touch myfile.txt
Editing a file in the current directory
master@ctnb1:~$ vi myfile.txt

Finding things with the command 'find'
There's so much on a computer's hard drive, nobody could ever know from memory where everything is. Perhaps the smart lad who won the spelling bee by spelling 'prestidigitator' might be able to, but most of us are going to have to find things now and then.
Fild files larger than 20000 kilobytes in the current directory
master@ctnb1:~$ find . -type f -size +20000k -exec ls -lh {} \; | awk '{ print $8 ": " $5 }'

How many times have you seen "RTFM"? Manpages are there for a reason -- to help you understand how to use a command
Check nano's manual
master@ctnb1:~$ man nano

This post will be extended from time to time. If you would like to suggest a command or a tool added to this post, don't hesitate to let us know in the comments section 🙂
The following two tabs change content below.


  1. Thanks for sharing this code :-).

  2. this is actually the second time i go through your site, great post as usually! thank you.