Unix-an overview

  1. What is Unix ?

Unix is a family of operating system which is a set of program,

It's act as a link between the computer and the User .

unix_architecture.png

2 . How Unix works ?

Unix is made up of three parts:

(a) Kernel

(b) Shell

(c) Application (user apps)

Kernel:

The core of unix is called kernel. It control and managing everything in this system.

Shell:

(a) It is the interface between the user and the kernel

(b) It accepts and interprets commands through a command line interface (CLI), also called terminals

(c) There are many types of shells:

  (1) BASH- Bourne again shell.

  (2) C Shell.

(d) Shell is accessed via command line interface of also called terminals.

                           * Basic Shell Commands*

CRUD: There are four basic operation in computer.

CRUD-Create, Read, Update, Delete.

Create: Creating file / folder / data

Read: Retrieving a file / folder / data

Update: updating a file / folder / data

Delete: delete a file / folder / data

Application: Application are the programs and application which works on Graphical User Interface (GUI) and hence are easier to use

# 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

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