Linux Commands

Linux Commands

Different commands have to be entered at the shell prompt or command prompt to configure and interact with linux. Some of these commands are listed below:

adduser
add a new user

cal
display a calendar

cd
change directory

chgrp
change the group ownership of files

chmod
change access permissions of files

chown
change file owner and group

chroot
change root directory

clear
clear terminal screen

cmp
compare two files

cp
copy files

cut
divide a file into several parts

df
display free disk space

dir
list directory contents

dirname
convert a full pathname to just a path

du
estimate file space usage

echo
display message on screen

eject
eject removable media

expand
convert tabs to spaces

fdformat
low-level format a floppy disk

find
search for files that meet a desired criteria

fmt
reformat paragraph text

fold
wrap text to fit a specified width

format
format disks or tapes

fsck
file system consistency check and repair

gawk
find and replace text within file(s)

gzip
compress or decompress named file(s)

info
Help info

ln
create links between files

locate
find files

ls
list information about file(s)

man
Help manual

mkdir
create directories

more
display file contents or piped output one screen at a time

mv
rename or move files or directories

passwd
modify a user password

printf
format and print data

pwd
print working directory

rm
remove files

rmdir
remove an existing directory

shutdown
shutdown or restart linux

symlink
create a new name for a file

tr
translate, squeeze, and/or delete characters

useradd
create a new user account

usermod
modify a user account

users
list users currently logged in

watch
execute/display a program periodically

whereis
report all known instances of a command

which
locate a program file in the user's path

who
print all usernames currently logged in

whoami
print the current user id and name

yes
print a string until interrupted

For more linux commands, visit www.mediacollege.com.