Basic Linux commands part 1

These commands will work with most (if not all) distributions of Linux as well as most (?) implementations of Unix.

Communication
ftp – File Transfer Protocol.
login – Sign on.
rlogin – Sign on to remote system.
rsh – Run shell or single command on remote system.
talk -Exchange messages interactively with other terminals.
telnet – Connect to another system.
tftp – Trivial file transfer protocol.

Comparisons

cmp – Compare two files, byte by byte.
comm – Compare items in two sorted files.
diff – Compare two files, line by line.
diff3 – Compare three files.

File Management
cat – Concatenate files or display them.
chfn -Change user information for finger, email, etc.
cksum – Compute checksum.
chmod -Change access modes on files.
chsh – Change login shell.
cp – Copy files.
csplit -Break files at specific locations.
dd -Copy files in raw disk form.
file – Determine a file’s type.
head – Show the first few lines of a file.
less – Display files by screenful.
ln – Create filename aliases.
ls – List files or directories.
merge – Merge changes from different files.
mkdir -Create a directory.
more – Display files by screenful.
mv – Move or rename files or directories.
newgrp – Change current group.
pwd – Print working directory.
rcp – Copy files to remote system.
rm -Remove files.
rmdir -Remove directories.
split – Split files evenly.
tail – Show the last few lines of a file.
wc – Count lines, words, and characters.

Printing
lpq – Show status of print jobs.
lpr – Send to the printer.
lprm – Remove print job.
lpstat – Get printer status.
pr – Format and paginate for printing.

Programming
ar – Create and update library files.
as – Generate object file.
bison – Generate parsing tables.
cpp – Preprocess C code.
flex – Lexical analyzer.
g++ – GNU C++ compiler.
gcc – GNU C compiler.
ld – Link editor.
m4 – Macro processor.
make – Create programs.
ranlib – Regenerate archive symbol table.
rpcgen – Translate RPC to C code.
yacc – Generate parsing tables.

Program Maintenance
cvs – Manage different versions (revisions) of source files.
etags – Generate symbol list for use with the Emacs editor.
gctags – Generate symbol list for use with the vi editor.
gdb – GNU debugger.
gprof – Display object file’s profile data.
imake – Generate makefiles for use with make.
make – Maintain, update, and regenerate related programs and files.
nm – Display object file’s symbol table.
patch – Apply patches to source code.
rcs – Manage different versions (revisions) of source files.
size – Print the size of an object file in bytes.
strace – Trace system calls and signals.
strip – Strip symbols from an object file.

Searching
apropos – Search manpages for topic.
egrep – Extended version of grep.
fgrep – Search files for literal words.
find – Search the system for filenames.
grep – Search files for text patterns.
strings – Search binary files for text patterns.
whereis – Find command.

Shell Programming
echo – Repeat command-line arguments on the output.
expr – Perform arithmetic and comparisons.
printf – Format and print command-line arguments.
sleep – Pause during processing.
test – Test a condition.

Storage
bzip2 – Compress files to free up space.
cpio – Create and unpack file archives.
gunzip – Expand compressed (.gz and .Z) files (preferred).
gzip – Compress files to free up space.
shar – Create shell archive.
tar – Copy files to or restore files from an archive medium.
zcat – Display contents of compressed files.

System Status
at – Execute commands later.
atq – Show jobs queued by at.
atrm – Remove job queued by at.
chgrp – Change file group.
chown – Change file owner.
crontab – Automate commands.
date – Display or set date.
df – Show free disk space.
du – Show disk usage.
env – Show environment variables.
finger – Display information about users.
kill – Terminate a running command.
printenv – Show environment variables.
ps – Show processes.
stty – Set or display terminal settings.
who – Show who is logged on.

Text Processing
col – Process control characters.
cut – Select columns for display.
ex – Line editor underlying vi.
expand – Convert tabs to spaces.
fmt – Produce roughly uniform line lengths.
fold – Break lines.
gawk – Process lines or records one by one.
ghostscript – Display PostScript or PDF file.
groff – Format troff input.
ispell – Interactively check spelling.
join – Merge different columns into a database.
paste – Merge columns or switch order.
rev – Print lines in reverse.
sed – Noninteractive text editor.
sort – Sort or merge files.
tac – Print lines in reverse.
tr – Translate (redefine) characters.
uniq – Find repeated or unique lines in a file.
vi – Visual text editor.
xargs – Process many arguments in manageable portions.

Miscellaneous
banner – Make posters from words.
bc – Arbitrary precision calculator.
cal – Display calendar.
clear – Clear the screen.
man – Get information on a command.
nice – Reduce a job’s priority.
nohup – Preserve a running job after logging out.
passwd – Set your login password.
script – Produce a transcript of your login session.
su – Become a superuser.
tee – Simultaneously store output in file and send to screen.
which – Print pathname of a command.

About the author

tux

View all posts

2 Comments

Leave a Reply