Unix - An Overview

  • Introduction
  • Types
  • How Unix works?
  • Important Unix Commands
  • Important Shortcut Keys

Introduction

Unix is an operating system i.e. an interface between user and hardware. Unix was first developed at AT&T Bells Laboratories in 1969, released on November 3, 1971 and has been under constant development since ever. It is a stable, multitasking, multiuser operating system for the servers and the computers. Unix operating system have a graphical user interface (GUI) which provides us easy to use environment.

Types

There are different version of Unix which are as follows:

  • Sun Solaris
  • GNU/Linux
  • Mac OS X
  • iOS
  • Android

How Unix Works?

Unix is made up of three parts which are as follows:

  • Kernel
  • Shell
  • Utilities

unix.png

Kernel

Kernal is the hub of the operating system, people also mention it as the heart of the Unix. The Kernel acts as the bridge between the operating system and hardware on which it is running.

Shell

The shell acts as an interface between the user and Kernal. The Shell is a command-line interpreter (CLI). It interprets commands passed by the user and executes programs based on the input and displays the output.

Shell gives us an environment where we can run commands, programs, and shell scripts as well. Sometimes the Shell is also named as Terminal

  • In Unix there are two major types of shell:
  • Bourne Shell: In Bourne type shell $ is the default prompt.
  • C Shell: In C type shell % is the default prompt.

  • Prompt: Prompt or also called Command Prompt($/%) is issued by the shell. when the Command Prompt is displayed on the terminal we can write the commands.

Utilities

Utilities are the programs and applications which work on Graphical User Interface (GUI) and hence are easier to use. Some examples are file explorer, setting, etc.

How Unix Works?

Suppose we type mkdir Folder (which is used to create a new directory or folder). The shell will search the file containing the program mkdir, and then request the Kernel through system calls to execute the program, when the program is terminated, the shell will give us another prompt.

Important Unix Commands

  • echo (text): to print text on the terminal screen
  • clear: to clear the terminal screen
  • exit: to exit the terminal
  • pwd: to show the present working directory
  • ls: to list the stuff in the present directory
  • cd: to change directory means to enter the child directory from a parent directory
  • cd ..: to go back in parent directory i.e. a step back
  • man: used to display manual for any command
  • ls -l: it shows a list of stuff along with all information such as file permission information, file size, date, and time it was created, number of files inside it, and name of the file.
  • ls -a: it also shows a list similar to "ls -l" command but it also shows the hidden files (which starts with the period)
  • ls -s: to display a list of stuff sorted by the size
  • ls-r: to display a list of stuff in reverse order
  • touch: to create a new file
  • echo "text" >>file.txt: to update a line in the file (new line added to file)
  • head (file.txt): to show the top 10 lines of the file
  • tail (file.txt): to show the bottom 10 lines of the file
  • cat (file1.txt): to display the file on the terminal screen
  • nano (file.txt): to open the editor window for the file
  • grep: to find a string in the file
  • grep -n: to find the string along with the line number in the file
  • mkdir: to make a new directory
  • rm: used to delete the file
  • rmdir: used to delete the empty directory
  • rm -r (folder): to delete any folder
  • mv (oldname) (newname): used to rename the folder
  • cp (source) (destination): to copy te file

() these contain attributes.

Important Shortcut Keys:

  • Ctrl+C: Copy text
  • Ctrl+V: Paste text
  • Ctrl+X: Cut text
  • Ctrl+S: Save the file
  • Ctrl+Z: Undo
  • Ctrl+Alt+T: Open terminal
  • Ctrl+Alt+L: LockScreen
  • Ctrl+Alt+D: Show desktop
  • Alt+Tab: Switch Tab
  • Ctrl+W: Close window
  • Ctrl+X: Exit from editor window(which was opened using nano command)
  • Ctrl+Z: To come out of any command in terminal
  • Ctrl+C: To come out of any command in terminal
  • Ctrl+Shift+C: Copy from terminal
  • Ctrl+Shift+V: Paste in terminal

Your suggestions and feedbacks are appreciated. You can write back to me on: