This is article, we’ll explain you most 15 useful Linux commands.
The Linux command like is a text interface to shell, terminal, console, prompt, etc. It can give the appearance of being complex and confusing to use. Yet the ability to copy and paste commands from a website, combined with the power and flexibility the command line offers.
Most 15 Useful Linux Commands
Let’s get started.
1. df – report file system disk space usage
df displays the amount of disk space available on the file system containing each file name argument. If no file name is given, the space available on all currently mounted file systems is shown. Disk space is shown in 1K blocks by default, unless the environment variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used.
2. vim – Vi IMproved, a programmer’s text editor
Vim is a text editor that is upwards compatible to Vi. It can be used to edit all kinds of plain text. It is especially useful for editing programs.
There are a lot of enhancements above Vi: multi level undo, multi windows and buffers, syntax highlighting, command line editing, filename completion, on-line help, visual selection, etc.. See “:help vi_diff.txt” for a summary of the differences between Vim and Vi.
3. crond – daemon to execute scheduled commands
Cron is started from /etc/rc.d/init.d or /etc/init.d when classical sysvinit scripts are used. In case systemd is enabled, then unit file is installed into /lib/systemd/system/crond.service and daemon is started by systemctl
start crond.service command. It returns immediately, thus, there is no need to need to start it with the ‘&’ parameter.
4. dd – convert and copy a file
Copy a file, converting and formatting according to the operands.
5. grep, egrep, fgrep – print lines matching a pattern
grep searches for PATTERN in each FILE. A FILE of “-” stands for standard input. If no FILE is given, recursive searches examine the working directory, and nonrecursive searches read standard input. By default, grep prints the matching lines.
6. gzip, gunzip, zcat – compress or expand files
Gzip reduces the size of the named files using Lempel-Ziv coding (LZ77). Gzip will only attempt to compress regular files. In particular, it will ignore symbolic links. By default, gzip keeps the original file name and timestamp in the compressed file. These are used when decompressing the file with the -N option. This is useful when the compressed file name was truncated or when the time‐
stamp was not preserved after a file transfer.
7. wget – The non-interactive network downloader.
wget is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies.
8. chown – change file owner and group
chown changes the user and/or group ownership of each given file. If only an owner (a user name or numeric user ID) is given, that user is made the owner of each given
file, and the files’ group is not changed.
9. kill – terminate a process
The command kill sends the specified signal to the specified processes or process groups. If no signal is specified, the TERM signal is sent. The default action for this signal is to terminate the process.
10. find – search for files in a directory hierarchy
find searches the directory tree rooted at each given starting-point by evaluating the given expression from left to right, according to the rules of precedence, until the outcome is known (the left hand side is false for and operations, true for or), at which point find moves on to the next file name.
11. xargs – build and execute command lines from standard input
xargs reads items from the standard input, delimited by blanks (which can be protected with double or single quotes or a backslash) or newlines, and executes the command (default is /bin/echo) one or more times with any initial-arguments followed by items read from standard input. Blank lines on the standard input are ignored.
12. dmesg – print or control the kernel ring buffer
dmesg is used to examine or control the kernel ring buffer. The default action is to display all messages from the kernel ring buffer.
13. sleep – delay for a specified amount of time
Pause for NUMBER seconds. SUFFIX may be ‘s’ for seconds (the default), ‘m’ for minutes, ‘h’ for hours or ‘d’ for days. Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number. Given two or more arguments, pause for the amount of time specified by the sum of their values.
14. tee – read from standard input and write to standard output and files
Copy standard input to each FILE, and also to standard output.
15. tail – output the last part of files
Print the last 10 lines of each FILE to standard output. With more than one FILE, precede each with a header giving the file name.
These are few useful Linux commands. If you want to know more about selective command, you can simply run:
# man [command name]
You can get all the information about the command and syntax of the command.
In this article, we have seen most 15 useful Linux commands.
Get high performance Intel Xeon duel E5 series server and KVM VPS instantly.