Sunday, 28 February 2016

What is Security Enhanced Linux (SELinux) ?

    Selinux is the highest level of security in a linux system. Selinux in a system has three basic modes- enforcing, permissive and disabled mode. A system in selinux enforcing mode assures high security to the system. Permissive mode also ensures security by logging all activities to the log files and providing warning messages but it is not as secure as the enforcing mode where every suspected activity is simply rejected and system is ensured complete security. Selinux facility can also be made inactive by switching it into the disabled mode thereby making the system security fragile. There is not any particular reason as to why one has to disable the selinux but there are certain applications that require the system to be in disabled mode to function at ease. This is simply because these applications are not created to work in compact with selinux. 

The 'getenforce' command allows us to know the current selinux mode.

To change to a different mode we use the command 'setenforce'.

For eg: setenforce 0 (disabled mode)
             setenforce 1 (enforcing mode)
           

Is Linux Virus Free?

Linux is undoubtedly much more secure than windows or mac systems. Now there exist a  misconception that linux systems cannot be affected by virus. Linux systems are prone to virus attacks like any other operating systems. It is just that linux has much better access controls and permissions when compared to others. In linux a file is not in execute mode by default which considerably reduces the chances to virus attacks. A file in execute mode is called a script in linux but otherwise a file is not in its execute mode even if created by the super user until its permission is manually changed.

Tuesday, 23 February 2016

Basic Commands to begin with

     There are few basic commands that every linux user must master initially to get going. One among them is the man command that provides one with the man page i.e the manual page of a particular command. The man page describes a command in detail. 

For eg: man ps
(Note: ps command gives a snapshot about the current processes in the system)

            As shown in the above example, this command would open up the manual page for the command 'ps'. The page would have a complete description about the command 'ps' along with its usage details, the types pf arguments to be used along (if any) etc. This is one of the most useful commands that helps a beginner to  know what exactly yet another command does to the system.

     The next important thing to know is how to install a software into the linux system. As we know there are different distributions of linux and there exist slight differences in the commands that are being used for the same purpose. Considering the Ubuntu distro of linux, we have the apt-get command that helps install a particular software into the system. Th same installation process is done in Redhat Enterprise Linux using the yum command. Both these basically does the same. Sticking on to Ubuntu distro as said earlier, an apt-get command helps to install a software. The command is written as shown below.

sudo apt-get install  

Again commands sudo apt-get remove   and sudo apt-get upgrade would remove and upgrade the service respectively.

Every service ones installed may need to be stopped or restarted if necessary. The following commands helps one do it:

sudo /etc/init-d/ start
sudo /etc/init-d/ stop
sudo /etc/init-d/ restart
                                             

The concept of Shell, Root and Capitalization in Linux

          Put in simple words, shell is the screen one uses to interact with the operating system. In a broader perspective, there are two basic shell types namely graphical user interface (GUI) and the line user interface (LUI). A line user interface is much more powerful when compared to the graphical interface and linux server versions of most of the distros are LUI by default. LUI is mostly preferred by all computer geeks around the globe who are also well off in linux commands. To a beginner therefore every distro comes with a fairly good desktop version which allows them to have a graphical interface just like the windows operating system. But since linux systems are mainly used for server functionalities like email servers or web servers it is necessary that one pick up the linux commands and switch to linux server versions as it has much more to offer than desktop versions of the same distros.
            Root is one of the biggest concepts in the linux world. Root simply means the highest level of anything and everything in linux. A linux system has a user account 'root' by default and this account is bounded with the highest most privileges. A user logged in as root has the ultimate power in a linux system. Again the term 'root' also implies the meaning 'highest level' in general. The root of a user is nothing but the home directory of the user. Similarly the root of the operating system means the highest level where the operating system is installed.
            The third yet very important concept to the understood by a beginner is that in the linux world capitalization does matter. Windows except when it comes to passwords does not care about capitalization whereas in linux, an uppercase character is different from a lower case character.



What is Linux?

LINUX is nothing but an operating system. An operating system is basically a software layer that lies between the hardware and software applications of your computer to ensure proper communication between the two. Now, a major difference between the commonly used windows operating system to the linux operating system is that, linux is open source. By open source we mean, the user/customer is able to obtain the entire source code using which the system was build. A windows user has access to the software after purchase but is not fed with the source code. Now by open source it only means that the source code of the operating system is available to its users, it  does not imply that they have the right to modify it. There are different open source licensing policies that do let them modify the code but it has to be clearly studied and understood well in advance.
      Linux was developed between 1991-1994 by a computer student named Linus Torvalds as part of his project. A common misunderstanding people have about linux is that they believe it to be an enhancement of the unix operating system which it is not. Unix again is an open source operating system but has nothing to do with linux. The two are entirely different operating systems developed during the early 90's. Being an open source operating system, a lot of computer geeks across the globe started experimenting with the code and eventually came up with several advanced versions or distributions of linux. Few popularly used linux distros today include Fedora, Ubuntu, CentOS, RedHat Enterprise Linux and many more.