Linux Commands

Want to speed up your work? You can use these Linux Commands as shortcuts which saves lot of yours time and money.

See in this article a list of Linux Commands.

Linux Commands

List of Most used Linux Commands

In routine maintenance, commands are used in moments of monitoring and (or) urgency:

  • ls : List all files in the directory
  • df : Shows the amount of space used on the hard drive
  • top : Shows memory usage
  • cd : Access a specific folder (directory)
  • mkdir : Create a directory
  • rm : Removes a file / directory
  • cat : Open a file
  • vi : Opens the vi editor(read viai ) to edit / create files

Control and Access Commands

  • exit : Log out, ie the shell (more help by typing man sh or man csh )
  • logout : Log out , that is, end the current session, but only in the C shell and bash shell
  • passwd : Changing our user’s password (logged in user)
  • rlogin : Log in securely to another Unix / Linux system
  • ssh : Secure session, comes from a secure shell, and allows us to login to a remote server using the ssh protocol
  • slogin : Safe version of rlogin
  • yppasswd : Changing our user’s password in the yellow pages

Communications Commands

  • mail : Send and receive emails
  • mesg : Allow or deny terminal messages and talk requests
  • pine : Another way to send and receive emails, a quick and practical tool
  • talk : Talk to other users who are currently logged in
  • write : Write to other users who are currently logged in

Help and Documentation Commands

  • apropos : Finds commands by keyword search
  • find : Find files, such as: find. -name * .txt -print , for searching text files from the current directory
  • info : Opens the information explorer
  • man : Very complete manual, searches for information about all the commands we need to know, such as man find
  • whatis : Describes what a given command is / does
  • whereis : Find the help page (man page), source code, or binary files for a given program

Text Editing Commands

  • emacs : screen-oriented text editor
  • pico : screen-oriented text editor, also called nano
  • sed : stream-oriented text editor
  • vi : Full-screen text editor
  • vim : Full-screen text editor improved (vi improved)

Files and Directories Management Commands

  • cd : Change current directory, such as cd directory, cd .., cd /
  • chmod : Change the protection of a file or directory, such as chmod 777, similar to the MS-DOS attrib
  • chown : Changing the owner or group of a file or directory, comes from change owner
  • chgrp : Change the group of a file or directory
  • cmp : Compare two files
  • comm : Select or reject lines common to two selected files
  • cp : Copies files, such as MS-DOS copy
  • crypt : Encrypt or Decrypt files (CCWF only)
  • diff : Compare the contents of two ASCII files
  • file : Determines the file type
  • grep : Searches for a file by a pattern, being a very useful and used filter, for example a cat a.txt | grep hello will show us only the lines in the a.txt file that contain the word “hello”
  • gzip : Compress or expand file
  • ln : Create a link to a file
  • ls : List the contents of a directory, similar to the dir command in MS-DOS
  • lsof : Lists open files, comes from list open files
  • mkdir : Create a directory, come from make directory ”
  • mv : Move or rename files or directories
  • pwd : Show us the entire path of the directory we are in at any given time, that is, a pathname
  • quota : Shows us disk usage and limits
  • rm : Deletes files, comes from remove, and is similar to the del command in MS-DOS, you have to be careful with the rm * command as it deletes everything without confirmation by default
  • rmdir : Delete directory, come from remove directory
  • stat : Shows the status of a file, useful to know for example the time and date of the last access to it
  • sync : Flush the file system buffers, synchronize the data on the disk with the memory, that is, write all the data present in the memory buffers to the disk
  • sort : Sort, join or compare text, which can be used to extract information from text files or even to sort data from other commands such as listing files sorted by name
  • tar : Create or extract files, often used as a backup or file compression program
  • tee : Copy the input to a standard output and other files
  • tr : Translate characters
  • umask : Change file protections
  • uncompress : Restores a compressed file
  • uniq : Report or delete repeated lines in a file
  • wc : Count lines, words and even characters in a file
  Defragmenting the Hard Drive

Viewing or Printing Files

  • cat : Shows the contents of a file, like the MD-DOS type command, and is also used to concatenate files, such as making cat a.txt b.txt> c.txt ”to join the a.txtb file .txt in a single named c.txt
  • fold : Shorten, that is, fold long lines to fit the output device
  • head : Shows the first lines of a file, such as with head -10 to.txt, or used as a filter to show only the first x results of another command
  • lpq : Examine the printer spooling queue
  • lpr : Print a file
  • lprm : Remove jobs from the printer spooling queue
  • more : Displays the contents of a file, but only one screen at a time, or even output from other commands, such as ls | more
  • less : Works like more, but with fewer features, fewer features and potential uses
  • page : Works similarly to the more command, but displays the screens inverted to the more command
  • pr : Page a file for later printing
  • tail : Works in reverse to the head command, shows us the last lines of a file or even the output of another command, when used as a filter
  • zcat : Show us a compressed file
  • xv : Used to display, print or even manipulate images
  • gv : Displays ps and pdf files
  • xpdf : Display pdf files, use gv
  Create Icons to Customize Folders in Windows 10

File Transfer Commands

  • ftp : Comes from the file transfer protocol, and allows us, using the ftp file transfer protocol, to transfer files between multiple hosts on a network, such as to an ftp server to send or pull files
  • rsync : Quickly and flexibly synchronize data between two computers
  • scp : Safe version of rcp

News or Network Commands

  • netstat : Shows the network status
  • rsh : A shell on other UNIX systems
  • ssh : Safe version of rsh
  • nmap : Powerful port-scan, for viewing open ports on a given host
  • ifconfig : View the ips of our machine, among other functions related to ips
  • ping : Ping a given host, that is, send icmp packets to a given host and measure response times, among other things

Process Control Commands

  • bg : Puts a suspended process in the background
  • fg : Unlike the bg command, fg brings back a process to the foreground
  • jobs : Allows us to view jobs running, when we run an application in the background, we can see that job with this command, and end it with a kill -9% 1 command, if it is job number 1, for example
  • top : Lists the processes that most cpu use, useful to check which processes are causing an excessive use of memory, and how much decpu each one uses at any given time
  • ^ y : Suspend the process on the next input request
  • ^ z : Suspend the current process

State Information Commands

  • clock : Sets the processor time
  • date : Displays the date and time
  • df : Displays a summary of free disk space
  • du : Displays a summary of disk space usage
  • env : Displays environment variables
  • finger : Search for user information
  • history : Lists the last commands used, very useful to remember also which commands were used to do a certain action in the past or what was done at a given time
  • last : Indicates the last user login
  • lpq : Examine the queue spool
  • manpath : Shows the search path for the man command pages
  • printenv : Print the environment variables
  • ps : List the list of running processes, useful to know the pid of a process to send it down with the kill command, among other things
  • pwd : Show us the entire path of the directory we are in at any given time, that is, a pathname
  • set : Sets session variables, that is, shell, C shell, bash or ksh
  • spend : List ACITS UNIX costs to date
  • time Measures program execution time
  • uptime : Tell us how long the system has been functional, when it was turned on and its uptime
  • w : Shows us who is in the system or what command each job is executing
  • who : Show us who is logged in the system
  • whois : Internet domain directory service, allows us to know information about certain domains on the Internet, when a domain was registered, when it expires, etc.
  • whoami : Tell us who owns the shell
  Diskpart - Utility to Format and Clean your Computer

Word Processing Commands

  • abiword : Open Source Word Processor
  • addbib : Create or modify bibliographic databases
  • col : Reverses the filter to line feeds
  • diction : Identifies sentences with words
  • diffmk : Marks differences between files
  • dvips : Convert TeX DVI files to PostScript files
  • explain : Explains phrases found by the diction program
  • grap : Pic preprocessor for drawing graphs, used in elementary data analysis tasks
  • hyphen : Find words with hyphens
  • ispell : Check spelling interactively
  • latex : Formats text in LaTeX, which is based on TeX
  • pdfelatex : For LaTeX documents in pdf format
  • latex2html : Convert LaTeX to html
  • lookbib : Find bibliographic references
  • macref : Create a cross-reference listing nroff / troff macro files
  • ndx : Create an index page for a document
  • neqn : Formats mathematics with nroff
  • nroff : Formats text for simple display
  • pic : Produces simple images for troff input
  • psdit : Filters a troff output for Apple LaserWriter
  • ptx : Creates an indexed swap but not in CCWF
  • refer : Insert references from bibliographic databases
  • roffbib : Run off a bibliographic database
  • sortbib : Sort a bibliographic database
  • spell : Finds spelling errors
  • style : Analyzes the surface characteristics of a document
  • tbl : Formats tables for nroff / troff
  • tex : Formats text
  • tpic : Convert pic source files to TeX commands
  • wget : It allows us to download complete web pages, with all files, in an easy and non-interactive way, without requiring the user’s presence, respecting also the archivorobots.txt

Web

  • html2ps : html to ps converter
  • latex2html : LaTeX to html converter
  • lynx : Web browser based on text mode, in other words, it is a web browser that allows us to open all types of pages by viewing only the text links, thus not seeing the images, and therefore it is quite fast, but requires practice to be handled
  • netscape : Netscape web browser
  • sitecopy : Application that allows us to maintain web sites easily and remotely
  • weblint : Syntax and html style checker

With that, we ended this article, which showed a good part of the most used Linux Commands.

Leave a Comment