Linux Commands can be used in Regular Day to Day Activities

There are N Number commands in Linux Operating system for doing different kind of works. Out of all I am going to provide you an 80 Linux commands List which are mostly used in Day to Day Activities. Of-course Learning important Linux commands first is the most easy to go.

Linux Commands Starts from Here

1. alias Linux Command
A way to run a command or a series of Unix/Linux commands using a shorter name than those that are usually associated with such commands.

See Here are the Practical Examples for Alias

2. apt-get Ubuntu Command
Apt-get is a tool to automatically update a Debian machine and to get and install Debian packages/programs.

To fetch package list
apt-get update

To download and install updates without installing new package.
apt-get upgrade

To download and install the updates AND install new necessary packages
apt-get dist-upgrade

Full command Update paths and Upgrade Distro
apt-get update && apt-get dist-upgrade

To install a new package(s)
apt-get install package(s)

Download a package without installing it. (The package will be downloaded in your current working dir)
apt-get download modsecurity-crs

Change Cache dir and archive dir (where .deb are stored).
apt-get -o Dir::Cache="/path/to/destination/dir/" -o Dir::Cache::archives="./" install

Show apt-get installed packages.
grep 'install ' /var/log/dpkg.log

Silently keep old configuration during batch updates
apt-get update -o DPkg::Options::='--force-confold'

3. aspell check Spelling
GNU Aspell is a free and open source spell checker designed to replace Ispell. It can either be used as a library or as an independent spell checker.

4. AWK, Gawk Programming Language (Looks akward but performs awesome job)
A programming language tool used to manipulate text. The language of the AWK utility resembles the shell programming language in many areas, although AWK’s syntax is very much its own.

Awk Tutorial

5. bzip2 – Compressing and send files with less in size
A portable, fast, open source program used to compress and decompress files at a high rate.

Compressing and Archiving files using Linux commands

6. Read file Content cat Linux command
A Unix/Linux command that can read, modify or concatenate text files. Cat commands are most commonly used for displaying the contents of a file.

7. Change Directory / Jump into Multiple directories
The cd command changes the current directory in Linux and can toggle between directories conveniently. Cd is similar to the CD and CHDIR commands in MS-DOS.

8. chmod – Change file Permissions as you like / required
Chmod changes the access mode (permissions) of one or more files. Only the owner of a file or a privileged user may change the access mode.

9. chown – Change Owership of Files / Directories
Chown changes file or group ownership and has the option to change ownership of all objects within a directory tree, as well as having the ability to view information on objects processed.

5 chown command examples

10. chage – Compare Two Files
The cmp utility compares two files of any type and writes the results to the standard output. By default, cmp is silent if the files are the same; if they differ, the byte and line number at which the first difference occurred is reported.

11. comm – Compare files
Comm compares lines common to file1 and file2.The output is in three columns; from left to right: lines unique to file1, lines unique to file2 and lines common to both files.

12. cp – Copy files source to destination within mounted paths
The cp command copies files and directories; copies can be made simultaneous to another directory if the copy is under a different name.

13. Take backup using cpio utility
copies files into or out of a cpio or tar archive. A tar archive is a file that contains other files, plus information about them, such as their file name, owner, timestamps and access permissions. The archive can be another file on the disk, a magnetic tape or a pipe. Cpio has three operating modes and is a more efficient alternative to tar.

Video Tutorial

14. CRONTAB – Execute future jobs by scheduling
CRON is a Linux system process that will execute a program at a preset time. To use CRON, a user must prepare a text file that describes the program to be executed and the times at which CRON should execute them. Then the crontab program can be used to load the text file that describes the CRON jobs into CRON.

How Cron Work, Best crontab examples

15. date – See system as you like custom format
Sets a system’s date and time. This is also a useful way to output/print current information when working in a script file.

command video tutorial

16. declare – declare the variables
Declares variables, gives them attributes or modifies properties of variables.

17. df – check your mount point disk space usage
Df displays the amount of disk space available on the file system containing each file name argument. With no file name, available space on all currently mounted file systems is shown.

Mostly used command in shell scripting to print statements – Linux Commands

18. echo – Print statement
Echo allows a user to repeat, or “echo,” a string variable to standard output.

echo command 20 practical examples

19. Enable printer
Enable command will stop or start printers or classes.

20. Set environment variables
Env runs a program in a modified environment or displays the current environment and its variables.

21. Evaluate arguments
Eval evaluates several arguments, concatenates them into a single command and then reports on that argument’s status.

22. exec – Execute commands in sub-shell
Exec replaces the parent process with whatever command is typed. This command treats its arguments as the specification of one or more subprocesses to execute.

23. exit – Logout session come out of server
The exit command terminates a script and can return a value to the parent script.

24. expect – Pass your password in program secure way
Expect talks to other interactive programs according to a script and waits for a response, often from any string that matches a given pattern.

25. export
Export converts a file into a different format than the one in which it is currently. Once a file is exported, it can be accessed by any application that uses its format.

Find any types of files using different search criteria

26.Search files and directories – Linux commands
Find searches the directory tree to find particular groups of files that meet specified conditions, including –name and –type, -exec and –size and –mtime and –user.

Find command with Best examples

27. for, while – Loop your script logic
For and while are used to execute or loop items repeatedly as long as certain conditions are met.

28. Check Memory usage
Free displays the total amount of free and used physical memory and swap space in the system, as well as the buffers and cache used by the kernel.

29. gawk – Extended your awk with gawk
See “AWK.”

28. grep – Out of bulk content grep required things
Grep searches files for a given character string or pattern and can replace the string with another. This is one method of searching for files within Linux.

Practical grep Command Tricks

29. Compress files and directories
Gzip is the GNU project’s open source program used for file compression, compressing web pages on the server end for decompression in the browser. This is popular for streaming media compression and can concatenate and compress several streams simultaneously.

20 Useful tar and zip command examples

30. Check your server IP Address details
Ifconfig is used to configure the kernel-resident network interfaces. It is used at boot time to set up interfaces. After that, it is usually only needed when debugging or when system tuning is needed.

31. Bring Up Ethernet Card
Ifup configures a network interface/enables a network connection.

32. Bring Down Ethernet card
Ifdown shuts down a network interface/disables a network connection.

33. less, more – Fit the logs to screen size
The less command lets an admin scroll through configuration and error log files, displaying text files one screen at a time, with backward or forward moving available in files. There is more mobility within files.

34. locate, slocate – Search whatever you want with stored database results
Locate reads one or more databases and writes file names matching certain patterns to output.

35. lft – Trace Network Path
Lft is similar to traceroute in determining connection routes, but provides a lot more information for debugging connections or finding where a box/system is. Lft also displays route packets and file types.

Links Files and make backup by hard link

36. ln – Link files and directories
The ln command creates a new name for a file through hard linking, allowing multiple users to share one file.

37. ls – List files and Directories
The ls command lists files and directories within the current working directory, allowing admins to see when configuration files were last edited.

25 Practical examples for ls command

38. man – Get instance help from command line interface
Short for “manual,” man allows a user to format and display the user manual built into Linux distributions which documents commands and other aspects of the system.

Getting Help from Command Line User Interface

39. mc
A visual shell, text-based file manager for Unix systems.

40. more – Read file content
See “less.”

50. neat – Change Network settings
Neat is a GNOME GUI admin tool which allows admins to specify the information needed to set up a network card, among other features.

51. netconfig/netcfg
Netconfig configures a network, enables network products and displays a series of screens that ask for configuration information.

52. Check which port is working
Netstat provides information and statistics about protocols in use and current TCP/IP network connections. It is a helpful forensic tool in figuring out which processes and programs are active on a computer and are involved in network communications.

Linux Netstat Command

53. Query against DNS
Nslookup allows a user to enter a host name and find the corresponding IP address. A reverse of that process to find the host name is also possible.

54. Od is used to dump binary files in octal (or hex/binary) format to standard output.

55. Change and set user password
Passwd command updates a user’s authentication tokens (changes their current password).

56. ping – Check next system is alive
Ping allows a user to verify that a particular IP address exists and can accept requests. Ping can be used to test connectivity and determine response time, as well as to ensure that a host computer the user is trying to reach is actually operating.

57. ps – Which process is running in my server
Ps reports the statuses of current processes in a system.

ps command examples

58. pwd – Which directory i am currently working
The pwd (print working directory) command displays the name of the current working directory. This is a basic Linux command.

59. read – Take input from user
Read is used to read lines of text from standard input and to assign values of each field in the input line to shell variables for further processing.

60. RPM – Red Hat Package Manager install require packages and remove unwanted
Red Hat Package Manager (RPM) is a command-line-driven program capable of installing, uninstalling and managing software packages in Linux.

61. rsync – Sync Or Backup the files to remote server
Syncs data from one disk or file to another across a network connection.

rsync command Linux

62. screen – Use multiple terminals with in single terminal
The GNU screen utility is a terminal multiplex or in which a user can use a single terminal window to run multiple terminal applications or windows.

63. sdiff – Find Difference between two files content
Sdiff finds differences between two files by producing a side-by-side listing indicating lines that are dissimilar. Sdiff then merges the files and outputs results to the outfile.

Change File content without editing the file

64. sed – Stream to edit file content
Sed is a stream editor that is used to filter text in a pipeline, distinguishing it from other editors. Sed takes text input, performs operations on it and outputs the modified text. Is typically used to extract part of a file using pattern matching or to substitute multiple occurrences of a string within a file.

Sed Command best examples

65. shutdown – Poweroff server
Shutdown is a command that turns off the computer and that can be combined with variables such as -h, for halt after shutdown, or -r, for reboot after shutdown.

66. slocate – Locate files
See “locate.”

67. Pocket Sniffer
Snort is an open source network intrusion detection system and packet sniffer that monitors network traffic, looking at each packet to detect dangerous payloads or suspicious anomalies. Snort is based on libpcap.
Stopping hackers with Snort.

68.Sort file content by order
Used to sort lines of text alphabetically or numerically according to fields; multiple sort keys can also be used.

sort command examples

69. Get super user access
Sudo allows a system admin to give certain users the ability to run some (or all) commands at the root level and logs all commands and arguments.

70. Connect to remote server and manage
SSH is a command interface used for securely gaining access to a remote computer and is used by network admins to control servers remotely.

ssh (Secure Shell)

71. tar – Zip the files & Directories
The tar program provides the ability to create archives from a number of specified files or to extract files from such an archive.

tar command in Linux

72. Analyze Server performance
TOP is a set of protocols for networks that performs distributed information processing in offices and displays the tasks on the system that take up the most memory. TOP can sort tasks by CPU usage, memory usage and run time.

Concert Text to Upper Case and Lower Case

73.Convert Lower case to UPPER Case
Tr is used to translate or delete characters from a text stream. Tr writes to standard output, but does not accept file names as arguments. It only accepts inputs from standard input.

74. Trace network path
traceroute determines and records a route through the internet between two computers and is useful for troubleshooting network/router issues. If the domain does not work or is not available, an IP can be tracerouted.

75. Verify / Check Linux Version details
Uname displays the name of the current operating system and can print information about the system.

76. Remove Duplicates
Uniq compares adjacent lines in a file and removes/reports any duplicate lines.

Uniq Command Tutorial

77. vi – Edit and Change file content
Vi is a text editor that allows a user to control the system by solely using the keyboard instead of a combination of mouse selections and keystrokes.

76. vmstat – Get more insights about system performance
Vmstat is used to get a snapshot of everything in a system and to report information on such items as processes, memory, paging and CPU activity. This is a good method for admins to use to determine where issues/slowdown in a system may be occurring.

77. wc – Count File lines, Characters and words
Wc counts the number of words, lines and characters in text files and produces a count for multiple files if several files are selected.

78. wget – Download anything using Direct URLs
Is a network utility that retrieves files from the web that support http, https and ftp protocols. Wget works non-interactively in the background while a user is logged off. This can create local versions of remote websites, re-creating directories of original sites.

79. while – Looping program
See “for.”

80. whoami – Known who you are.? logged in as – Linux commands
Prints or writes the user/login name associated with the current user ID to the standard output.

81. xargs – Do ex stream commands
Xargs reads, builds and executes arguments from standard input; blank lines in the input are ignored.

Thanks for your time.!! Please comment missing commands which you use regularly.

Related Articles

25 most common Commands

ls command 25 practical examples

103 Commands Video Tutorial

Thanks for your wonderful Support and Encouragement

Ravi Kumar Ankam

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

Leave a Reply

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