- 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
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 screenclear
: to clear the terminal screenexit
: to exit the terminalpwd
: to show the present working directoryls
: to list the stuff in the present directorycd
: to change directory means to enter the child directory from a parent directorycd ..
: to go back in parent directory i.e. a step backman
: used to display manual for any commandls -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 sizels-r
: to display a list of stuff in reverse ordertouch
: to create a new fileecho "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 filetail (file.txt)
: to show the bottom 10 lines of the filecat (file1.txt)
: to display the file on the terminal screennano (file.txt)
: to open the editor window for the filegrep
: to find a string in the filegrep -n
: to find the string along with the line number in the filemkdir
: to make a new directoryrm
: used to delete the filermdir
: used to delete the empty directoryrm -r (folder)
: to delete any foldermv (oldname) (newname)
: used to rename the foldercp (source) (destination)
: to copy te file
() these contain attributes.
Important Shortcut Keys:
Ctrl+C
: Copy textCtrl+V
: Paste textCtrl+X
: Cut textCtrl+S
: Save the fileCtrl+Z
: UndoCtrl+Alt+T
: Open terminalCtrl+Alt+L
: LockScreenCtrl+Alt+D
: Show desktopAlt+Tab
: Switch TabCtrl+W
: Close windowCtrl+X
: Exit from editor window(which was opened using nano command)Ctrl+Z
: To come out of any command in terminalCtrl+C
: To come out of any command in terminalCtrl+Shift+C
: Copy from terminalCtrl+Shift+V
: Paste in terminal
Your suggestions and feedbacks are appreciated. You can write back to me on: abhishek.990914@gmail.com