This Terminal Commands are most frequently used on Ubuntu Linux distro1. APTapt-get apt-files2. LS3. GREP4. MAN5. CAT

So we prepared a list of commands which enable the user to do more in less effort( because the GUI approach for doing the same thing would require a lot of directory surfing and complexity). The list follows:

1. APT

APT stands for Advanced Packing Tool. It is a utility provided in almost every popular Linux distribution nowadays. APT has vast range of commands for managing software packages. I’ll only discuss few of them here.

apt-get

This command is used to install a new software package from the source enumerated in /etc/apt/sources.list file. This command runs along with the sudo command. sudo is a utility provided for users to carry out commands which require root privilege. Sudo stands for SUperuser DO. Apt-get has been replaced by the simpler ‘apt’ in Ubuntu 16.04, although both work.

apt-files

This command is used to find the package to which a specific file belongs.

2. LS

ls command is used to list the files in the current directory. This utility is available in Unix and all Unix like operating systems. When the command is invoked without any argument, it displays the files in current directory. The various arguments that can be used are listed:

-a Lists all the files including files having “.” before their filename(These files are hidden and are not shown in the output of ls by default). -F appends a character to the filename which reveals the type of that file( e.g. * for executable / for directory), regular files have no such character. -l It displays the files in long format. Extra information like owner, group, size, last-modified date etc is displayed along with the filename. -t Displays files in order of time of last modification. -h Print size in human readable format.

3. GREP

grep command searches a file for lines containing the match with the string provided with the command. It can be supplemented with these arguments:

-w for word (grep -w ‘word1|word2‘ /path/to/file). -c for count (i.e., total number of times the pattern matched) (grep -c ‘word‘ /path/to/file). –color for coloured output (grep –color server /etc/passwd).

4. MAN

man utility provides an online manual for command it is used with. The manual lists A to Z information about that command. An example in which man command is used to get the manual for man command itself.

5. CAT

The cat command reads data from files and outputs its content in the terminal. Using cat is the simplest way to display file contents at the command line. MAN(1) Manual pager utils MAN(1) NAME man – an interface to the on-line reference manuals SYNOPSIS man [-C file] [-d] [-D] [–warnings[=warnings]] [-R encoding] [-L locale] [-m system[,…]] [-M path] [-S list] [-e extension] [-i|-I] [–regex|–wildcard] [–names-only] [-a] [-u] [–no-subpages] [-P pager] [-r prompt] [-7] [-E encoding] [–no-hyphenation] [–no-justification] [-p string] [-t] [-T[device]] [-H[browser]] [-X[dpi]] [-Z] [[section] page …] … man -k [apropos options] regexp … man -K [-w|-W] [-S list] [-i|-I] [–regex] [section] term … man -f [whatis options] page … man -l [-C file] [-d] [-D] [–warnings[=warnings]] [-R encoding] [-L locale] [-P pager] [-r prompt] [-7] [-E encoding] [-p string] [-t] [-T[device]] [-H[browser]] [-X[dpi]] [-Z] file … man -w|-W [-C file] [-d] [-D] page … man -c [-C file] [-d] [-D] page … man [-hV] Optional arguments include:

-s suppresses repeated empty output lines. -T displays tab characters as ^I.

The list is pretty long, but as always we included the top options only. What’s your favorite command? let us know in the comments.