Linux Commands

Click to rate this post!
[Total: 1 Average: 3]

Since Linux Os support the people to connect the people remotely, it is suggestable to use the Putty session to connect the remote sessions. And the admins can connect these systems using the remote IP through the putty session. As mentioned in the previous session, we will now discuss some administration commands.


This command is used to check the Linux distribution version.

linux commands 

And we can also get the same information with uname –a

linux commands


This option allows the administrator to add the user in the environment

adduser username

adduser sai

Then its ask you to enter the password. provide the password to the new user (sai) and also you to retype the password and some user details like full name, phone numbers and so on And after providing, all these details provide the confirmation with Y.

And the administrators can test these users with id username

id sai

With this command, you can get the complete information of the user

Furthermore, the admin checks the default options with username -D. These options are

-g group

.m home directory

-f inactive (to set the password expiry date)

-e expire ( to disable the user after the specified number of days)

-s Shell( user default login shell usually /bin/sh).

Like adding, the admin can also delete the users. And you can delete the users through the following command

userdel -r username

userdel -r sai

And username -h provides the list of all the options for the user.


This command is used for displaying

cat file_name

It is used to display the file contents.

How to make the copy content in the other file?

We can achieve this with the following command

cat file_name1 > file_name2.

Here the file_name1 refers to the source file and the file_name2 refers to the destination file

How the append the content?

Assume the file1 and file 2 contains two different files. Now we need to add the file 1 to file 2. And we can add through the following command

cat file_name1 >> file_name2

How to display the specified number of lines in a file?

we use head and tail command to display the specific number of the line. Here the head is used to display the top lines and the tail is used to display the bottom lines

head -x where x is a number > 0

tail -x where x is a number > 0

Here the appending starts at the end of the file end. In this case, file1 will be placed in file2 at the end of the file2.

So till now, we have seen the various options in the file. And now, we will discuss the various options that the file contains

Usually, a file can be accessed by three people namely for users, group as well as the other users. And these people have three different options namely read (r), write (w) as well as the execute (X) permissions.

Admins use ls-l filename to display the file permission settings. Admins can change the file permissions using chmod permissions type filename

EX: chmod -r file1

Other than rwx, we people use can also use the numeric arguments. So now let’s discuss the commonly used arguments

chmod 400 - This mode allows the read-only permission to the owner.

chmod 600- This mode allows the read and writes permission to the owner.

chmod 644 - In this mode, it allows the read permission to everyone and the write permission to the user

chmod 755 - This allows the read and executes permissions to everyone, read, write as well as the execute permissions to the owner as well as the group.

chmod 777- This mode allows the read, write as well as the execute permissions to everyone.

I hope the readers have got a basic knowledge of file permissions. So now lets some

Output Manipulation:

In real-time, in a file, the user may not requires the entire data, but requires the data with some filtration’s. So now we will discuss those commands with that filtration’s


In searching for the matching patterns, this command scans the output per line. With this command, people can get a complete line with those patterns.

ex: cat filename | grep "pattern"

cat file1| grep balajee


This command allows you to sort the output lines before displaying. By default, all the files here were sorted in alphabetical order.

ex: sort filename | sort

sort file1 | sort

Not only by the name in the file, but the users can also sort the files w.r.t size.

Unique :

As the name suggests, this command is used to display the unique file content/ files in a file/ folder respectively. Moreover, people apply this command to remove the duplicates in the file.

ex: sort file_name | uniq

sort file1 | uniq

In order to add the content to the file, we people used to scroll in a windows-like operating system. But this Linux platform does not support any kind of scroll. so we people depend on commands to append the data. Moreover, for the purpose of editing, we people depend on the VI editor. So now we will discuss the popular command that is useful in this editor.

h - moves the cursor to left

I - move the cursor to the right

k - moves up

i - move down

dd- delete the current line

:w - to save the changes made

:q - exit from the editor

:q! - will exit the editor without saving the changes.

i - used to insert the data.

a - append the content, the cursor will move one position to the right

o - insert a blank under the current cursor position to that line.
Some other commands:
man - used to get the information of the command.

-h - used to get the information in a short way.

pwd - displays the present working directory

ls- shows the folders and files in the current directory.

ls -a - shows the list of all files in the directory including the hidden files. These hidden files usually start with a dot (.)

mv <source> <destination> - moves the file from source to the destination

rm <file_name> - removes the specified filename

rm -r <file _name> - used to remove the directory

cp <source> <destination>- copied the file at the source to the destination

mount <source><destination> - used to mount the external devices like USB, SD-card, DVD's and so on to the local file system

df- h: display the mount information size like file size in MB. GB. KB.

du -sh /* - display the disk usage

ps -ef - list all the running process with the full details

top - displays the process and the system resources information

ifconfig - configure the network interfaces

iwconfig- configures the wireless interfaces
Network commands
ssh username@ip_address - connect to a remote server

ping ip_address - check the target is online and responding

netstat - to get the information of the network ports

deluser - deletes the user

chown user_name: group name directory name - change the owner of the file (or)the directory

su username - changes the username temporarily

users- prints the username of the logged users.

wc- counts the lines, bytes as well as the bytes

tar - copies and compress the files

date - display the current date

file - displays the file types

finger - displays the detailed information to the users who were logged into the account

free - display the amount of free and the used memory in the system

kill - terminates the running process

sleep - suspends the process execution for a specified time

w (or) finger - displays the detailed information about the logged in users

who - displays the brief information about the logged in users
How to install the package in Ubuntu machines?
apt -get install <package_name>

apt -get install MySQL

And I hope you were successfully installed the package in your system. And this Linux stuff is enough to get into the AWS. And we will discuss further if anything required. 

Visit Linux Training to master in Linux

to our newsletter

Drop Us A Query

Trending Courses
  • oracle 12c rac | OnlineITGuru
    Oracle RAC Training
  • Oracle is the large vendor in providing the various storge services to the people across the globe. This vendor provides a different amount of storage services to the people across the globe.

  • salesforce lightning training | OnlineITGuru
    Salesforce Lightning Training
  • Developing an application is not a simple and easy task. There are various parameters that the web developer need to take care while developing an application. One of those parameters that the developer needs to take care of is the code reusability.

  • Selenium with python
    Selenium with Python Training
  • As we know, that Selenium with Python Web Browser Selenium Automation is Gaining Popularity Day by Day. So many Frameworks and Tools Have arisen to get Services to Developers.

  • machine learning with python
    Machine Learning with Python Training
  • Over last few years, Big Data and analysis have come up, with Exponential and modified Direction of Business. That operate Python, emerged with a fast and strong Contender for going with Predictive Analysis.

  • Data science with R
    Data Science With R Training
  • Understanding and using Linear, non-linear regression Models and Classifying techniques for stats analysis. Hypothesis testing sample methods, to get business decisions.

  • data science with python
    Data Science with Python Training
  • Everyone starts Somewhere, first you learn basics of Every Scripting concept. Here you need complete Introduction to Data Science python libraries Concepts.

100% Secure Payments. All major credit & debit cards accepted.

Call Now Button