Search This Blog

Wednesday, July 25, 2012

Unix

Audio blog on Unix
Most probably every unix commands tutorial start with ls. Am gonna start with a command which i feel is the most important one in unix.

man:
man stands for manual. It can be used to see the manual of any other keyword or command in unix.
for example,
man ls
will provide the complete manual of ls command. You got doubt about the man command itself ??
try
man man
you get the manual of man command itself !! Now that’s cool ! So when you are doubtful about a command’s usage you can go for man.
There are also many other ways of getting help in unix. For example, you can type
command_name --help
The difference between man and help is that help gives you only the usage of the command whereas man gives its complete description by opening a separate manual page.

There are plenty of unix commands and explaining everything is not possible. I will instead explain what i understood about unix and some other basic stuffs.

Unix and Linux ?
Unix is one of the oldest operating systems. It's developed as multi user OS.  IBM and other manufacturers had their own version of unix. So a new kernel based on unix’s kernel was developed by Linus Torvalds and he also made it open source. Linus’s Unix then came to be known as the Linux. It was designed to work on all PC’s unlike unix at that time. Unix is priced whereas Linux is free !! Other than these, there are no big differences between unix and linux.

Kernel:
Kernel is the most basic abstraction of an OS. It’s the layer between hardware and applications at the most basic level. Kernel’s have three types namely,


  • monolithic
  • micro
  • hybrid
In monolithic kernel all functionalities like processor management,memory management, disk management, i/o management are loaded into memory. advantage: fastest !

In microkernel only the very basic functionalities like processor management are loaded into main memory, others are implemented as user level functions. They depend on some interface to interact with the hardware. advantage: less memory footprint

Hybrid tries to have the advantage of both monolithic and microkernel. They are essentially microkernels with some functionalities of monolithic kernel as well.

Shell:
Shell is just command line interpreter. It's an user interface for typing commands as text in unix and other similar OS. Commands can also be typed in a file and given as input. Bourne shell and C shell are two popular types of shells. C shell uses syntax similar to C language. It also has some additional functionalities. tcsh is an advanced version of C shell.

Other interesting commands i came across:
ssh: It stands for secure shell. It allows you to remotely access the shell of some other user in the network.
ssh remote_user_name@ip
you will be prompted for the remote client’s password after typing the above command. On entering password you will then have full access to that remote system via shell.

scp: It stands for secure copy. It allows you to copy files/directories to or from one system to another system over network.
scp file_name remote_user_name@ip:path
The above command copies a file from your system to the path mentioned in the remote user’s system. The contents are encrypted and sent over network for security. There is also an option to change the encryption type depending on the security level and transfer speed you want.

write: It allows users to send message from one system to another.
write remote_user_name@ip on tty
the above command will open connection with the remote systems terminal having tty you specified.
tty will be like pts/0 , pts/1 ...(just see it as terminal/shell number)
after the connection is set up whatever you type will be transmitted to the remote shell.

Unix is so vast. I will explore more in days to come and it's definitely fun. See you in next blog.


Trained @ Sourcebits

No comments:

Post a Comment