Introduction and features of Linux Operating System

Reading Time: 4 minutes

Introduction and features of Linux Operating System

Linux Operating System is a open-source operating systems like Unix. It was initially developed by Linus Torvalds on September 17, 1991and features are free and open-source operating system and the source code can be modified and distributed to anyone commercially or noncommercially under the GNU General Public License.  

Linux banner
Reference: Linux Operating System

Agenda of Linux Operating System

  • 5W’s 1H ◦ Introduction to Operating Systems
  • Linux Introduction (5w’s h)

4W1H in Practice

Below, Topics You’re learning.

What is Linux?

Where is Linux used?

Why should I learn Linux?

Who developed Linux?

How in real world Linux gained popularity?

What is Linux?

An Open-Source operating system and community developed operating system for computers, servers, mainframes, mobile devices and embedded devices.

OS such as Ubuntu, Debian, Fedora, OpenSuse, Redhat, Android etc.

What is Unix?

Unix is an operating system that is installed only on specific hardware and Unix developed for multi user and multi tasking purposes in mid 1970’s. Unix mostly used by Sun Solaris and supports only few file systems

OS such as IBM AIX, Solaris, HP-UX, Darwin, etc.

Where is Linux used?

Web Serving

Networking

Databases

Scientific Computing

Why should I learn Linux?

Linux is the standard for servers. There’s no way around it. Linux has long been the most popular HTTP server software, and it’s built firmly on top of the Linux kernel.

Enterprise users might lean towards Windows for compatibility with Windows’s workstations, but server admins broadly work in Linux such you want to understand and work with servers, you need to understand Linux.

Why Linux?

Price – Free

Ease – Not user friendly

Reliability – runs for years

Software – Mostly Enterprise level Software

Multi Tasking – Best for Multi Tasking

Security – Very Secure

Open Source – Yes! Lot of distributions

How in real world Linux gained popularity?

The cost right

Visible source code

Linux promotes open sourcing and freeware of the applications written to run on it.

How to access the Terminal?

Now you’re in the GUI, In many ways this is very similar to the Windows or Mac OSX OS ‘s and access the terminal you will need to look for the below icon on the launch bar on the left.

Now, We’ll see basic commands of Linux

File Permissions

File permissions are shown with ls -l:
student$ ls -l
total 64
-rwxrwxr-x 1 student student 832 Oct 2 16:26 backup.sh
-rwxr-xr-x 1 student student 70 Mar 6 2016 hello.pl
-rwxr-xr-x 1 student student 30832 Mar 6 2016 largefile.txt
-rwxr-xr-x 1 student student 53 Mar 6 2016 quote.txt
-rwxr-xr-x 1 student student 142 Mar 6 2016 records.data
-rw-rw-r-- 1 student student 8 Oct 15 08:54 regex.txt
-rwxr-xr-x 1 student student 53 Mar 6 2016 sed.out
-rwxr-xr-x 1 student student 76 Mar 6 2016 wallquote.txt

Basics:
r - read
w - write
x - execute

The first character can be regular file
d - directory
l - symbolic link
b - block file
c - character device file
p - named pipe
s - socket

Chmod Command

Change file permissions with chmod:

SUID and SGID

SUID (Set User ID) is an access flag that allows the executable to be executed with the permissions of the executable’s owner or group.
SGID (Set Group ID) causes files and sub-directories to inherit the GID of the directory.

SUID Executables

SUID is necessary when normal users are executing programs that require elevated privileges, such as the password utility that modifies /etc/shadow:

$ ls -l /usr/bin/passwd
-rwsr-xr-x 1 root root 54256 Oct 16 19:37 /usr/bin/passwd

The s in place of the owner’s x permission indicates the
program SUID.

Searching for files by patterns in name/contents

A common and task of someone using the Linux Command Line (shell) is to search for files/directories with a
certain name or containing certain text. There are 2 commands you should familiarise yourself with in order to
accomplish this:

Find files by name

find /var/www -name '*.css'
This will print out the full path/filename to all files under /var/www that end in .css. Example output:
/var/www/html/text-cursor.css

/var/www/html/style.css

File Manipulation

Files and directories (another name for folders) are at the heart of Linux, so being able to create, view, move, and
delete them from the command line is very important and quite powerful. These file manipulation commands allow
you to perform the same tasks that a graphical file explorer would perform.

Create an empty text file called myFile:
touch myFile
Rename myFile to myFirstFile:
mv myFile myFirstFile
View the contents of a file:
cat myFirstFile
View the content of a file with pager (one screenful at a time):
less myFirstFile
View the first several lines of a file:
head myFirstFile
View the last several lines of a file:
tail myFirstFile

vi myFirstFile
See what files are in your current working directory:
ls
Create an empty directory called myFirstDirectory:
mkdir myFirstDirectory
Create multi path directory: (creates two directories, src and myFirstDirectory)
mkdir -p src/myFirstDirectory
Move the file into the directory:
mv myFirstFile myFirstDirectory/
You can also rename the file:
user@linux-computer:~$ mv myFirstFile secondFileName
Change the current working directory to myFirstDirectory:
cd myFirstDirectory
Delete a file:
rm myFirstFile
Move into the parent directory (which is represented as ..):
cd ..
Delete an empty directory:
rmdir myFirstDirectory
Delete a non-empty directory (i.e. contains files and/or other directories):
rm -rf myFirstDirectory
.

File System

  • Linux treats everything as a file
  • Every operating system stores data on Disk Drives using structures called a file system. ◦ The file system consists of files, directories and info needed to access and locate them
  • Different types of file systems : EXT2, EXT3, XFS, windows: NTFS, FAT32
  • Linux file system stores info in hierarchy of directories and files

1 thought on “Introduction and features of Linux Operating System5 min read

Leave a Reply