Here is a list that contains one of the most used Linux commands, and a short explanation for them: ls – list – lists files and directories, can be used with a lot of options like: -a, -R, -l, -g, -r;
pwd – print working directory – shows the path of the current directory;
ifconfig – interface configuration – used to view and change the configuration of the network;
cd – change directory – used to change the current working directory;
df – disk free – must be used with -h option(the values will be displayed in KB/MB/GB);
du – disk usage – must be used with -h option, -s option will sum the subfolders and files capacity;
grep – global regular expression print – processes text line by line and returns the value that matches the request;
cat / tac – catenate – is the simplest way to display the contents of a file, directly in command line interface / tac reverses the order of the contents;
tail – outputs the last part of the contents of a file;
tee – used to dublicate input and to route it to multiple outputs at once;
touch – used to update the access and modification time of a file, if the file does not exist it is created with the specified name;
mkdir – make directory – used to create directories;
rm – remove – used to remove/delete files or directories;
cp – copy – used to make copies of files and directories;
less – is a simple command line file viewer;
head – used to display the first part of files;
file – used to determine the file’s type;
wc – word count – counts the words in a file / -m counts characters / -l counts lines;
ln – link – creates links between files;
find – searches the file system for the specified file;
locate / slocate – it searches in a database, it’s faster than “find” but not that accurate;
yum – used to install/remove packages, update/upgrade system (CentOS);
apt or apt-get – used to install/remove packages, update/upgrade system (Ubuntu);
whoami – shows the current user username;
who – shows the list of usernames;
uname – displays the operating system type, -a switch can be used for more details like distribution/version/kernel/release;
less /proc/cpuinfo – shows CPU hardware information;
cat /proc/meminfo – displays used and free memory information;
[updating with new commands…]