More than 80 common Linux commands and tools

  

Linux administrators can't just rely on the GUI graphical interface to eat. This is why we edit this most practical Linux command manual. This guide is designed especially for Linux administrators and system administrators, bringing together some of the most useful tools as a reference manual for their daily maintenance. By learning these simple tools, those who are afraid of the command line can also become a script master, thus maximizing the role of Linux by executing kernal commands and shell commands. Please take advantage of our guide, any Linux issues or need to find relevant answers, please be sure to send a message to our TechTarget China Server Forum.


alias

Run a command or a series of UNIX commands with a defined abbreviated name associated with a command.

How to use the alias command in Linux.

apt-get

Apt-get is a tool for automatically updating the DEBIAN system to get and install the DEBIAN patch/program.

If you use ”aptitude“ and ”apt-get” on the UBUNTU server to manage the program.

Understand Debian archives and apt-get.

Use apt-get to update your Debian machine.

Aspell GNU Aspell is a free and open source spell checker designed to replace Ispell. It can be used as a font or as a separate spell checker.

How to use Aspell to check spelling.

AWK, Gawk

This is a programming language tool for working with text. A large part of the language of the AWK tool draws on the shell programming language commonly used in many fields. Of course, the syntax of AWK is largely original.

Learn how to use AWK tools

Gawk is the version of the AWK programming language under the GNU project.

bzip2

This is a quick and easy open source program for compressing and decompressing files at high rates.

How to use bzip2 under Linux.

More on the use of bzip2 compression program instructions.

cat

A UNIX/LINUX command that reads, changes, or merges text files, most often used to display file content.

How to display file contents with CAT command under LINUX.

An article about what the cat command can do.

cd

The CD command is used to change the same day directory under LINUX. You can easily see the jump in several directories. It is very similar to the CD and CHDIR commands in MS-DOS.

See more on how to use the CD command to change the contents of the directory.

chmod

Chmod is used by giabian to access one or more files (permissions). Only one owner of a file or a privileged user can change this permission.

See examples of changing file access permissions using the chmod command.

chown

The Chown command is used to change the ownership of a file or group, as well as the option to batch change ownership of all objects in a directory, as well as to view the objects that are modifying properties. information.

Learn how to change file ownership with the chown command.

cmp

The Cmp tool is used to compare the contents of two files and output the results in a standard format. By default, if two files are identical, cmp will not return any results; if the two files are different, the first byte and the number of rows where the difference occurs will be returned as the result.

See an example of IBM using the cmp command.

comm

The Comm command is used to select the public line of two sorted files. The input result is divided into three columns, from left to right: only the line in file 1, the line only in file 2, and the line in both file 1 and file 2.

More information on comparing lines with the comm command.

A detailed guide on using the comm command.

The cp Cp command is used to copy files and directories, and if the target directory is a different name, the entire directory can be copied synchronously to the destination.

View if you use the cp command to copy LINUX files and directories.

cpio

The Cpio command is used to copy files into and out of archive storage and directories. A file contains additional information about them, such as their file name, owner, change time, and access. Permissions. The archive location can be other files on the disk, or a box of tapes. Cpio has three modes of operation and is more efficient than the tar command.

Learn if you use the cpio command to perform a Unix to linux migration file move.

See how to back up files with the cpio command.

CRON

CRON is a LINUX system process that can run a program at a specified time. To use CRON, the user must prepare a text file containing information about when the program will be executed with CRON. The crontab command time program is then used to load the text file describing the CRON task to perform CRON.

Use the CRON command to execute the command at the specified time.

date

The Date command is used to set the system date and time. Another useful point is that you can output/print current time information while working with script files.

A series of examples from IBM about setting the date and time with the date command.

declare

The Declare command is used to declare variables, assign variable properties, or change variable properties.

An example of declaring a variable with the delcare command.

df

The Df command is used to display the available disk space of the file system where a file (as a parameter to the command) is located. If you do not use the file name as a parameter, the available disk space for the entire file system is displayed.

More information on using the df command to display available disk space.

echo

Echo is used to repeat or write a string to standard output.

More information on using the echo command in shell scripts.

enable

The Enable command is used to stop or start the printer queue device.

Example of how to use the enable command to start an LP printer.

env

Env is used to set the environment for executing commands, or to display the current environment and its parameters.

Use the env command to change the environment.

eval

The Eval command can calculate several parameters and then find a separate command to generate the status of these parameters.

More information on using the eval command to find the result of a parameter.

exec

The Exec command is used to enter a command to replace a running parent process. This command executes the input parameters as one or more child processes.

More examples of replacing a parent process with exec.

exit

The Exit command is used to terminate a script and return a value to the parent process.

More examples of using exec to terminate script execution.

expect

The Expect command is used to talk to another interacting process in the script and wait for a response, often used to find a specific matching character in a string.

Use expect to find a response.

export

The Export command is used to convert a file to another format. Once a file has been converted, it can be accessed by programs that support this format.

Example of exporting data from a database using the export command.

find

The Find command is used to find files that meet certain conditions in the directory tree, including parameters such as name, type, exec, size, mtime, and user.

Use the find command to quickly locate a file

for, while

For and while are used to execute or repeat a series of actions that satisfy the condition.

Use the for command to loop through the option actions.

Use the while command to loop through the option actions.

free

The Free command is used to display the size of free and used physical memory and the size of the swap partition of the system, as well as the size of the cache used by the kernel.

Learn if you use the free command to optimize your computer's memory usage.

gawk See AWK.

grep

The Grep command is used to find a file containing a string, and you can also replace the string with the specified value. This is a good way to search for files under LINUX.

Example of searching for files with grep.

gzip

Gzip is an open source program used to compress files in the GNU environment. It compresses web pages on the server and then decompresses them on the browser.

It is also widely used for compression of streaming media files, which can merge and compress multiple streaming media files at the same time.

Example of compressing files with gzip.

ifconfig

Ifconfig is used to configure the network interface. It is used to set up the network interface at startup. After that, it is generally only used when troubleshooting or system adjustments.

Example of configuring a network with ifconfig.

Use ifconfig to find linux network configuration problems.

ifup

Ifup is used to configure the network interface and initiate a network connection.

More information about configuring network interfaces with the ifup command.

ifdown

The Ifdown command is used to close a network interface and disable a network connection.

More information about shutting down the network with the ifdown command.

less, more

The Less command allows the administrator to roll back the configuration and error log files and display the text file one screen at a time, making it easy to move around in the file. More flexible than other commands.

View a few different files viewed with the less command.

Similar to the less command, the more command can display the file one screen at a time, but there is no less convenience in moving the file back and forth.

View an example of displaying text with the more command.

locate, slocate

The Locate command is used to read one or more databases and then output the filenames that match the target parameters.

Use locate to quickly search for files/directories.

Like the locate command, slocate, or secure locate, provides an index and a quick way to search for files, while still storing file permissions and owner information securely, so that unauthorized users will not be able to View these files.

An example of using the slocate command to safely index files quickly.

lft

The Lft command is similar to traceroute in that it determines the connection route, but it provides more information for troubleshooting the connection or finding the location of the box/system. It can display routing packets and file types.

Use the lft command to view more information about routing packets.

ln

The ln command can create a file name by hard linking, allowing multiple users to share a single file.

Ln creates an example of a hard-wired file.

More examples of using the ln command.

ls

The Ls command is used to list the files and directories of the current path. The administrator can use this command to determine when the configuration file was last edited.

This article is also discussing the ls command.

Use the ls command to list examples of files and directories.

man

As a shorthand for manual, the man command allows a user to display the user manual built into the Linux system in a specified way, including command documentation and other system features.

This article also has a discussion about the man command.

View if you use the man command.

View an example of the man command display page format.

mc

This is a menu-style shell that provides text-based file management for Unix systems.

An extended guide to managing files with mc.

Copyright © Windows knowledge All Rights Reserved