Top linux commands

João Nascimento
5 min readAug 14, 2020

# man — The command gives users access to manual pages for command-line utilities and tools.

# cat — The cat utility reads files sequentially, writing them to the standard output. The file operands are processed in command-line order. If file is a single dash (`-’) or absent, cat reads from the standard input. If file is a UNIX domain socket, cat connects to it and then reads it until EOF.

# cdcd is a Linux command to change the directory/folder of the terminal’s shell. You can press the tab button in order to auto complete the directory name.

# chmod — To change directory permissions in Linux, use the following:

  • chmod +rwx filename to add permissions.
  • chmod -rwx directoryname to remove permissions.
  • chmod +x filename to allow executable permissions.
  • chmod -wx filename to take out write and executable permissions.

# chown [USER] — the username or the numeric user ID of the new owner of a file. [:] — use the colon when changing a group of a file. [GROUP] — changing the group ownership of a file is optional. FILE — the target file

# curlcurl is a command line tool to transfer data to or from a server, using any of the supported protocols (HTTP, FTP, IMAP, POP3, SCP, SFTP, SMTP, TFTP, TELNET, LDAP or FILE). curl is powered by Libcurl. This tool is preferred for automation, since it is designed to work without user interaction

# dfdf (abbreviation for disk free) is a standard Unix command used to display the amount of available disk space for file systems on which the invoking user has appropriate read access.

# diffdiff stands for difference. This command is used to display the differences in the files by comparing the files line by line. Unlike its fellow members, cmp and comm, it tells us which lines in one file have is to be changed to make the two files identical.

# echoecho is a command that outputs the strings it is being passed as arguments. It is a command available in various operating system shells and typically used in shell scripts and batch files to output status text to the screen or a computer file, or as a source part of a pipeline.

# exit — To exit with saving changes made:

  • Press < Escape> . (You must be in insert or append mode if not, just start typing on a blank line to enter that mode)
  • Press : <colon>. The cursor should reappear at the lower left corner of the screen beside a colon prompt. …
  • Enter the following: wq. …
  • Then press <Enter>.

# find — Find command is used to search and locate the list of files and directories based on conditions you specify for files that match the arguments. Find can be used in a variety of conditions like you can find files by permissions, users, groups, file type, date, size, and other possible criteria.

# free — The free command provides information about unused and used memory and swap space on any computer running Linux or another Unix-like operating system

# grepGrep is a Linux / Unix command-line tool used to search for a string of characters in a specified file. The text search pattern is called a regular expression. When it finds a match, it prints the line with the result

# gzipGzip command in UNIX : This command is used to compress the files in order to reduce the file space. Usually when we compress the text files, it will reduce the file space to almost half of the original size. If the command “gzip” is successful then the file name will end with

# history — In Linux, there is a very useful command to show you all of the last commands that have been recently used. The command is simply called history, but can also be accessed by looking at your . bash_history in your home folder. By default, the history command will show you the last five hundred commands you have entered.

# killkill command in Linux (located in /bin/kill), is a built-in command which is used to terminate processes manually. kill command sends a signal to a process which terminates the process.

# toptop command is used to show the Linux processes. It provides a dynamic real-time view of the running system. Usually, this command shows the summary information of the system and the list of processes or threads which are currently managed by the Linux Kernel

# lsls is a command to list computer files in Unix and Unix-like operating systems. ls is specified by POSIX and the Single UNIX Specification. When invoked without any arguments, ls lists the files in the current working directory.

# mkdir — The mkdir command is is used to create new directories. A directory, referred to as a folder in some operating systems, appears to the user as a container for other directories and files

# mv — mv (short for move) is a Unix command that moves one or more files or directories from one place to another. If both filenames are on the same filesystem, this results in a simple file rename; otherwise the file content is copied to the new location and the old file is removed.

# pingPing is a command-line utility, available on virtually any operating system with network connectivity, that acts as a test to see if a networked device is reachable. The ping command sends a request over the network to a specific device.

# passwdpasswd command in Linux is used to change the user account passwords. The root user reserves the privilege to change the password for any user on the system, while a normal user can only change the account password for his or her own account.

# ps — The ps (process status) command is used to provide information about the currently running processes, including their process identification numbers (PIDs). A process, also referred to as a task, is an executing (i.e., running) instance of a program. Every process is assigned a unique PID by the system.

# ssh — The ssh command provides a secure encrypted connection between two hosts over an insecure network. This connection can also be used for terminal access, file transfers, and for tunneling other applications. Graphical X11 applications can also be run securely over SSH from a remote location.

# sudo — The sudo command allows you to run programs with the security privileges of another user (by default, as the superuser). It prompts you for your personal password and confirms your request to execute a command by checking a file, called sudoers , which the system administrator configures

# uname — The uname Command. The uname command reports basic information about a computer’s software and hardware. When used without any options, uname reports the name, but not the version number, of the kernel .

# ww command in Linux is used to show who is logged on and what they are doing. This command shows the information about the users currently on the machine and their processes. … The JCPU time is the time used by all processes attached to the tty.

# whoami — In computing, whoami is a command found on most Unix-like operating systems, prints the effective username of the current user when invoked.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response