Understanding Linux File Permissions and Ownerships

From one of our previous articles "How to manage Linux Users and Groups" we discussed on how Linux becomes a multi-user OS, what is a user and a group with their configurations. By design, even though Linux allows multiple users can use the same computer in the same time without affecting others, Linux doesn't allow you to access or modify files belonging to other users. If Linux allows you to do it, that would be a security risk. But somehow they have implemented a security measure to mitigate that security risk. With that we can make sure only desired users and groups can access the relevant files and directories.

If we take a small demonstration. Here, we will log in as a normal user and try to access a root directory.

It gave a permission denied error when accessing. Why ? That's because /root directory is owned by user root. Only a privileged user can access or modify that.

So, Linux introduces two kind of factors which tells who can access or modify a file as w…

Linux Commands Tips and Tricks

Have you ever noticed a moment when someone doing tasks with some simple terminal commands which took a long time for you to do. And you feels like to asking from yourself "Wow, How did he do that very easily ?"  Then you think yourself, If i also could do like that.

Yeah. That's fine. From this article we discuss most of the tips you should know, some sort of pretty, tiny commands. But they will be very useful. Go through the complete article and make yourself to hear a Wow from someone else. It will make you very comfortable.

1) Execute a previous command

Normally every command that we type is storing in a file named ".bash_history" inside of your home directory. To view the the past typed commands we can use the command history in your terminal. It will list all the commands that you typed.

There are some options we need to know

!! : This will run the last command in the history. According to the above image, !! will rerun the history command. !<number>…

How to manage Linux Users and Groups

What is a multi-user Operating system ? When the OS allows multiple people to use the computer at the same time without affecting other's stuff, it becomes a multi-user OS. Like wise Linux is also belongs to above mentioned category. There can be having multiple users, groups with their own personal files and preferences. So, this article will be helpful for you in below actions.

Managing Users ( Create/Edit/Delete accounts, Suspend accounts )Manage User's Passwords ( Set Password policies, Expiration, further modifications )Manage Groups ( Create/Delete user groups )  From this article we will discuss mostly useful Linux commands with their syntax's. 
How to create a user

1) useradd : Add a user

syntax : useradd <options> <username>

eg : We will create a user named ""Jesica". The command is useradd jesica . First i switch to root user with sudo su command as i am a sudo user. We discussed about how to grant sudo access to users in a previous articl…

Pipeline and Redirection in Linux

In the Linux operating system, Pipeline and Redirection are mostly useful and powerful techniques that helps in sending the output of one program to a file or as an input of another program. These two techniques are highly recommended to be learned as a beginner because they are needed to write scripts and other stuff in day-to-day life with Linux when you are in immediate stage. With the previous articles you had already worked with "|" which is pipeline even without being aware of it.

First we need to learn the three data streams in Linux operating system.  Simply they are as below.
STDIN (0) - Standard input represents the way data is input to the the programSTDOUT (1) - Standard output represents the output of the program ( what screen displays )STDERR (2) - Standard error represents the errors of the output Above three data streams in a rough image is as below. 

STDOUT - In all of the Linux operating systems, the output of a command ( program ) is going to standard output…

SUDO: What is it in Linux ?

Here, we are discussing about a very important topic in Linux. In a previous article about different types of users, we mentioned the name super users. In this article we are going in deep with super users topic in Linux. You will be learned each an every corner should be known.

Who is a super user in Linux ?

A privileged user who can gain root access for system administration.  Simply any user can be a superuser. But to gain that, root user should grant that user with superuser privileges. After becoming a superuser, it can switch to root immediately or can gain root power temporally for administrating the systems. All the commands needed for everything will be discussed below.

Where do you need superuser access ?

Administrating packagesUser administrationAccessing root owned filesOperating system level administration Above mentioned are a few places where you need superuser access. When a normal user tries to do above, they will get "Permission denied" message. Why does this…