Lab 1ObjectiveLab 1 is intended to provide an introduction to Linux. The objective of this lab is to make students familiar with the Linux command-line environment and develop the skills of shell scripting. This lab serves as a platform for the subsequent labs related to system calls, process management, file management, and memory management.
Tutorial Tutorial 1: Log in to the system(credentials in the board), open the Terminal and type the following on the login prompt : echo hello world The word hello world would get displayed as an output on the terminal. The echo command displays a line of text, type man echo to read what an echo command does. Linux provides on-line manuals for different commands through an interface called man . To know about man type the following on the terminal: man man and read the description that is displayed. For all commands, we will use the syntax man Type echo $SHELL This prints /bin/bash bash is the name of the login shell that is currently in use Study the following Unix/Linux general-purpose utility commands using their man pages and execute them on the terminal : man, who, cat, cd, cp, ps, ls, mv, rm, mkdir, rmdir, echo, date, time, kill, chmod, chown, pwd, cal Tutorial 2: Study the following Linux commands: sed, grep and awk
Use the grep command to find how many lines of a word in the given word. The filename and the word are provided as inputs. Tutorial 3: Shell scripting Write a shell script to display HELLO WORLD on the terminal : Open an editor Type echo HELLO WORLD save the file with .sh extension ( say test.sh) close the editor At the terminal, type sh test.sh Expected output at the prompt: HELLO WORLD
Reviews
There are no reviews yet.