Presentation is loading. Please wait.

Presentation is loading. Please wait.

L&T Infotech1 UNIX – Getting Started - Aneesh Ramani.

Similar presentations


Presentation on theme: "L&T Infotech1 UNIX – Getting Started - Aneesh Ramani."— Presentation transcript:

1 L&T Infotech1 UNIX – Getting Started - Aneesh Ramani

2 L&T Infotech2 Agenda UNIX Anatomy Listing Files, Browsing Directories Copy, Move, Display Files File system security Processes Other Useful Commands UNIX variables vi editor

3 L&T Infotech3 UNIX Anatomy Kernel is the hub of the operating system: it allocates time and memory to programs and handles the filestore and communications in response to system calls. The shell acts as an interface between the user and the kernel. The shell is a command line interpreter (CLI). It interprets the commands the user types in and arranges for them to be carried out.

4 L&T Infotech4 Listing Files, Browsing Directories Everything in UNIX is either a file or a process. ls - lists the contents of your current working directory ls –a, ls -l mkdir – creates a new sub-directory cd – to change to the working directory cd ~, cd.., cd / pwd – to find out the absolute pathname of the working directory

5 L&T Infotech5 Copy, Move, Display Files cp file1 file2 - makes a copy of file1 in the current working directory and calls it file2 mv file1 file2 - moves file1 into a different file/ directory. rm – removes a file rmdir – removes a directory cat – to display contents of a file tail – to display last few lines of a file

6 L&T Infotech6 File system security ls -l chmod - to change permissions of a file chmod go-rwx filename

7 L&T Infotech7 Processes A process is an executing program identified by a unique PID (process identifier). To background a process, type an & at the end of the command line. ps - to see information about the processes jobs - to view job list kill - to kill a process

8 L&T Infotech8 Other commands tar - to tar a group of files/directories tar cvf filename.tar directory tar xvf filename.tar gzip - to compress a file. gunzip - to uncompress a zipped file (.gz extension) history - lists the command history in the shell !! - In C shell, this provides the last command alias - to set alias for an action e.g. alias ll="ls -ltr"

9 L&T Infotech9 UNIX Variables Variables are a way of passing information from the shell to programs when you run them. Shell variables - apply only to the current instance of the shell Environment variables - set at login are valid for the duration of the session echo $variable - to print the value of the variable.profile,.cshrc,.kshrc,.bashrc

10 L&T Infotech10 vi editor vi filename There are 2 modes in vi Command - where you can run command Insert - where you can insert text i - to insert a - to append x - to cut p - to paste. - to repeat last command u - to undo

11 L&T Infotech11 THANK YOU


Download ppt "L&T Infotech1 UNIX – Getting Started - Aneesh Ramani."

Similar presentations


Ads by Google