1/23/2019

Linux Command for your reference

linux Command
In this post, I will give the list of Linux command you need to use in your Linux machine. Below I will categorize the Linux command into a few different topics for your understanding.

Miscellaneous

echoDisplay a line of text. Often used in programs and scripts to relay information to users.
factorDisplays possible factors of a decimal number.
exprSolve math equations.
lookLook up a word in the dictionary.

Terminal

clearClear the terminal screen.
historyDisplay recently used commands. You can also view these commands via the Up and Down keys.
!Repeat a recently used command. You can use !n to repeat the n-th command in history or !-n to repeat what happened n commands ago.
manDisplay the manual for a terminal program.
whatisDisplay a brief description of a terminal program. A simpler alternative to the man command.
aliasCreate a shortcut to a command or, when combined with the cd command, directory.
exitExit or close the terminal.

Navigation & File Management

cdChange directory. Used to navigate between folders.
pwdDisplay current directory.
cdChange current directory.
lsDisplay a list of files in the current directory.
cpMakes a copy of a file. Defaults to the current directory unless you specify a specific one.
mvMove a file from one directory to another.
rmRemove a file or set of files.
statDisplay when a file was last accessed, modified, or changed.
touchChange the date accessed or date modified time of a given file to right now.
rmdirDelete a file or files.
mkdirCreate a directory. Defaults to the current directory, but you can also specify one.
rmdirDelete a directory. Defaults to the current directory, but you can also specify one. The target directory must be completely empty.
renameChange the name of a file or set of files.
findSearch a specific directory (or your entire PC) to find files that match designated criteria.
locateSearch for files or directories. Faster than the find command, but has fewer options.
grepSearch a specific file or set of files to see if a string of text exists and where.
mountAttach a separate filesystem (such as an external hard drive or USB stick) to your system's main filesystem.
umountDetach a separate filesystem from your system's main filesystem.
catDisplay the contents of a text file. Also works with multiple files.
chmodModify the read, write, and execute permissions of a file.
chownChange the user or group that owns a file.

Users

suSwitch user. Unless you desigate a specific user, this command will attempt to sign in as the root user (which you can think of as the system administrator).
whoamiDisplays the current user name.
idDisplay current user and group.
passwdCreate or update a user's password.

Network Management

ipDisplays you IP address, network interfaces, bandwidth usage, and more.
pingSend or receive data from another computer on a network. Often used to test whether a network connection is established and the speed of that connection.
digLook up a domain's DNS address
wgetDownload a file.
sshSecure Shell. Connect and login to a remote network location.

System Administration

unameDisplays core system information such as kernel version, hardware, and operating system.
sudoEnter before a command to perform the command as a system administrator. User must have administrator priveleges for this to work.
apt/dnf/pacmanPrograms for installing software and updates. Which one to use depends on your Linux-based operating system. Each requires administrator rights and additional instructions, such as sudo apt install program-name .
jobsDisplay the status of all current jobs. A job is a representation of a running process or group of processes.
bgSend a job to the background.
fgSend a job to the foreground.
killEnd a process according to its process ID (which you can get using the ps command.
killallEnd all processes whose names match your query.
psDisplay a list of running processes. Defaults to processes started by the current user.
topDisplays a list of running processes, sorted by how much CPU each uses. Unlike ps, the command updates in real-time.
uptimeDisplays time since last boot.
whereisFinds the executable file for a program.
dfDisplays how much disk space is used and free on your system.
freeDisplays how much RAM is used and free on your system.


Share this: