Introduction to Unix

Companies like AMDOCS prefer someone who has a good knowledge of Unix, Linux. Most software engineers have a good grip over Automation technologies like Selenium Webdriver. So if you are going for an interview please ensure you know the basics of UNIX and how it works, the basic commands used in Unix. Please go through this article once to comprehend it.

What is Unix?

Unix is the most powerful and popular multi-user and multi-tasking operating system. The basic concepts of Unix were derived from Multics. Multics system was intended as a time-sharing system that would allow multiple users to simultaneously access a mainframe computer.

Salient Features of Unix - 

  • Mult-user system where the same resources can be shared by different users.
  • supports multi-tasking, where each user can execute multiple tasks at the same time.
  • First OS to be written in a high-level language, that made it easier to port to other systems with minimum adaptions.
  • Data can be maintained in a hierarchical structure which is effective to regulate.
  • Has built-in networking functions to exchange information with another user.

Why use Unix?

As shown below is the high-level overview architecture of Unix system. It has an OS X which is the powerful interface. It gives you a truly wonderful graphical environment and the power of Unix Command-line interface.

  • Kernel - It is the heart of the operating system and performs tasks like memory management, task scheduling, and file management.
  • Shell - A utility that processes your request. When a command is typed at the terminal, the Shell interprets the command and calls the program that we entered.
  • Files and Directories - All the data of Unix is organized in files and files are later organized into directories.  

Unix Utilities - 

    /
This is the root directory which should contain only the directories needed at the top level of the file structure.
    /bin
This is where the executable files are located. They are available to all user.
    /dev
These are device drivers.
    /etc
Supervisor directory commands, configuration files, disk configuration files, valid user lists, groups, ethernet, hosts, where to send critical messages.
    /lib
Contains shared library files and sometimes other kernel-related files.
    /boot
Contains files for booting the system.
    /home
Contains the home directory for users and other accounts.
    /mnt
Used to mount other temporary file systems, such as cdrom and floppy for the CD-ROM drive and floppy diskette drive, respectively
    /proc
Contains all processes marked as a file by process number or other information that is dynamic to the system.
    /tmp
Holds temporary files used between system boots
    /usr
Used for miscellaneous purposes, or can be used by many users. Includes administrative commands, shared files, library files, and others
    /var
Typically contains variable-length files such as log and print files and any other type of file that may contain a variable amount of data
    /sbin
Contains binary (executable) files, usually for system administration. For example fdisk and ifconfig utlities.
    /kernel
Contains kernel files

Example of Unix Hierarchy - 


Basic Commands used in Unix -

  • Passwd - For Changing passwords
  • Who/ whoiam - Who logged into Unix system
  • w - Get clear and all information about the user
  • sudo -  To run Program with Root privileges
  •  adduser <username> - Create user
  • Clear - Clear screen
  • touch - Create empty file or directory
  • Is - Listing file
  • ll - Long list
  • cat - view file
  • chmod - change file permissions
  • chown - change file owner
  • chgrp - change file group
  • cat > : Create file
  • mkdir : make directories
  • rmdir/ rm-r - Delete directories
  • rm - remove files
  • rm -rf* - Delete everything in path
  • ll -i - To know incode number
  • In - s: soft link
  • In - Hard link
  • cal - Calendar
  • Date - sys date
  • echo - Display message
  • bc - calculator
  • script - record your session
Hope it was an insighful article to understand Unix in detail. Keep Learning!

Comments

Popular posts from this blog

Azure Tutorials Series - Azure Networking

Testing in CI/CD

Azure Tutorials Series - IaaS vs PaaS vs SaaS