Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

UNIX common commands


May 23, 2021 UNIX Getting started


Table of contents


This quick guide lists the commands, including syntax and brief instructions. For more details, use -

$man command

Files and directories

These commands allow you to create directories and process files.

Command Describe
cat Displays the contents of the file
Cd Change the directory to the directory name
chgrp Change the file group
chmod Change permissions
Cp Copy the source file to the destination
file Determine the file type
find Find the file
Grep The regular expression for the search file.
head Displays the first few lines of the file
ln Create a soft link that uses oldName
Ls Displays information about the file type.
Mkdir Create a new directory directory name
more The data is displayed as a page.
Mv Move (rename) using oldName for newame.
Pwd Print the current working catalog.
Rm Delete (delete) the file name
rmdir Delete the existing directory as long as it is empty.
tail Finally, print a few lines in the file.
touch The time at which the file was accessed and modified.

The operation data

The contents of the file can be compared and changed with the following command.

Command Describe
Awk Mode scans and processes the language
Cmp Compare the contents of the two files
comm Compare sorted data
cut Cut out the selected fields on each line of a file
Diff Differential file comparison
expand Extended tabs are spaces
join Add some common field files
Perl Data manipulation language
Sed Stream text editor
sort Sort file data
split The file is split into smaller files
Tr Translate characters
uniq A file that reports duplicate lines
Wc count the words, lines and characters
Open the vi text editor
Vim Open the VIM text editor
Fmt Simple text formatting
spell Check for misspelled text
ispell Check for misspelled text
ispell Check for misspelled text
Emacs GNU Emacs project
ex,exit Line editor

The file is compressed

Files can be compressed to save space. Compressed files can be created and checked -

Command Describe
compress The file is compressed
gunzip gzip compresses the extracted file
Gzip GNU replaces compression
uncimpress Unzip the file
unzip List, test and extract ZIP archives of compressed files
zcat Unzip the file
zcmp Compare compressed files
zdiff Compare compressed files
zmore Read through the CRT view of the file filter compressed text

Get information

Various UNIX manuals and documentation are available online. The following shell command gives the message -

Command Describe
apropos
The command to find keywords by targeting
info The display command information page is online
man Show the man page online
whatis Search full name search whatis database.
Yelp GNOME Help Browser

Network communication

These commands are used to send and receive files from local UNIX hosts to remote hosts around the world.

Command Describe
Ftp The file transfer program
Rcp A copy of the remote file
rlogin Remotely log on to the UNIX host
rsh Remote shell
Tftp Simple file transfer program
Telnet Let the connection to another host terminal
Ssh Secure shell terminal or command connection
Scp Secure shell remote file copy
sftp Secure shell file transfer program

Some of these commands can be restricted for security reasons on your PC.

Messages between users

The UNIX system supports on-screen information to other users and emails from around the world -

Command Describe
evolution
Mail processing tool in Linux GUI
mail Simple e-mail program for sending or reading e-mail messages
mesg
Messages that are allowed or rejected
parcel Send the file to another user
pine Based on the VDU-mail tool
talk with other users
write Write information to other users

Programming tools

The following programming tools and languages are based on what is installed on your Unix which are available.

Command Describe
Dbx SUN debugger
Gdb GNU debugger
make Maintain program groups and compilers.
nm Print the list of programs
size The size of the print program
strip Remove the symbol table and relocation bits
Cb C program beautification
Cc The ANSI C compiler is the Sun SPARC system
ctrace C program debugger
Gcc GNU ANSI C compiler
indent Indent and format C program source code
Bc Interactive arithmetic language processor
gcl GNU Common Lisp
Perl The common language
Php Web embedded language
py Python language interpreter
Asp Web embedded language
Cc The C-compiler is the Sun SPARC system
g ++ GNU C s compiler
javac Java compiler
appletvieweir JAVA small program viewer
netbeans The Java integrated development environment is on Linux
sqlplus Run Oracle SQL Interpretation
sqlldr Run Oracle SQL Data Load
Mysql Run the MySQL SQL explanation

Miscellaneous commands

These commands list or change information about the system -

TD.gt; group
Command Describe
chfn Change your finger information
chgrp Change group ownership of the file
chown Change the owner
date The print date
determin The terminal type is automatically found
du The amount of print used by the disk
echo The standard option for echo parameters
exit Exit the system
finger Print information about the signed-in user
groupadd Create a user group
Show group members
homequota Displays quotas and file usage
Iostat Report I/O statistics
kill Sends a signal to a process
last Shows the user's last sign-in
logout Sign out of UNIX
lun List userna name or login ID
Netstat Displays the network status
passwd Change the user's password
passwd Change your login password
printenv The display value of a shell variable
Ps Displays the status of the current process
Ps Statistics during printing
quota -v Displays disk usage and restrictions
reset Reset terminal mode
script Keep the terminal session script
script The output of a saved instruction or procedure
setenv Set the environment variable
stty Set the terminal options
time Time command
top All system processes are displayed
tset Set the terminal mode
Tty Print the current terminal name
umask Indicates that permissions are given to view the file by default
uname The display name of the current system
uptime Gets the system running time
useradd Create a user account
users The print name on the user record
Vmstat Report virtual memory statistics
W Show what the logged-in user is doing
who The list of logged-in users