What are common Linux commands ?
List of Common Linux commands
Linux is most commonly used operating system. below is the cheat sheet for commonly used Linux commands.
Linux is most commonly used operating system. below is the cheat sheet for commonly used Linux commands.
|
Command
|
Description
|
|
Awk
[options] pattern [filenames]
|
Search files or output for a
particular pattern.
|
|
cat [filename]
|
Display file’s contents.
|
|
cd /directorypath
|
Change to directory.
|
|
chmod [options like -R] mode
filename
|
Change a file’s permissions.
|
|
chown [options like -R]
filename
|
Change who owns a file.
|
|
Clear
|
Clear a command line screen.
|
|
cp [options like -R] source
destination
|
Copy files and directories.
|
|
date [options]
|
Display or set the system
date and time.
|
|
df [options like -h]
|
Display used and available
disk space.
|
|
du [options like -s]
|
Show how much space each file
takes up.
|
|
file [options] filename
|
Determine what type of data
is within a file.
|
|
find [pathname] [expression]
|
Search for files matching a
provided pattern.
|
|
grep [options] pattern
[filesname]
|
Search files or output for a
particular pattern.
|
|
id
|
Shows detail about user
logged-Id including UID and Groups assigned.
|
|
kill [options] pid
|
Stop a process. If the
process refuses to stop, use kill -9 pid.
|
|
less [options] [filename]
|
View the contents of a file
one page at a time.
|
|
ln [options like -s] source
[destination]
|
Create a shortcut which is
called symlink.
|
|
locate filename
|
Search a copy of your file
system for the specified filename.
|
|
lpr [options]
|
Send a print job.
|
|
ls [options like -lrt]
|
List directory contents.
|
|
man [command]
|
Display the help information
for the specified command.
|
|
mkdir [options] directory
|
Create a new directory.
|
|
mv [options] source
destination
|
Rename or move file(s) or
directories.
|
|
passwd [name [password]]
|
Change the password or allow
(System administrator) to change any password.
|
|
ps [options]
|
Display a snapshot of the
currently running processes.
|
|
Pwd
|
Display the pathname for the
current directory.
|
|
rm [options like -rf]
directory
|
Remove (delete) file(s)
and/or directories.
|
|
rmdir [options] directory
|
Delete empty directories.
|
|
ssh [options] user@machine
|
Remotely log in to another
Linux machine, over the network. Close an ssh session by typing exit.
|
|
su [options] [user
[arguments]]
|
Switch to another user
account.
|
|
tail [options] [filename]
|
Display the last n lines of a file (the default is 10).
|
|
tar [options] filename
|
Store and extract files from
a tarfile (.tar) or tarball (.tar.gz or .tgz).
|
|
Top
|
Displays the resources being
used on your system. Press q to exit.
|
|
touch filename
|
Create an empty file with the
specified name.
|
|
who [options]
|
Display who is logged on i.e.
which user.
|
|
Scp [options]
user@machine:path
|
Copies file/directory to
other Linux machine
|
What is Linux ?
Linux
Distribution
Linux is
computer operating system based on the model of free
and open source software development.
It is leading operating system for servers based machines.It is followed by thousands of people each day.
Linux is an
increasingly popular operating system that is proving to be a viable
alternative to Microsoft’s Windows and Apple’s Mac operating systems. Linux is
open source.
Distribution
Although Linux is originally
the kernel created by Linus, it does not function as an OS generally available
with only the kernel. To function as an OS, various software applications must
be combined with the kernel. Thus, the combination of the kernel and some
application software supporting it for use as a OS is called a “distribution”.
Linux Advantages:
·
Optimized
for highly scalable/Multicore systems
·
Manages
system complexity
·
Reduces
data bottlenecks
·
Improves
application performance
·
Reduce
power consumption
·
Ensures
end-to-end data integrity
Types of Linux systems:
·
Red-hat
enterprise linux
·
Ubuntu
·
Oracle
enterprise linux