0% found this document useful (0 votes)
22 views11 pages

Experiment No 1

This document provides instructions for completing a practical assignment on Unix shell commands, static and dynamic IP addresses, and bash scripting in kiosk mode. Students are asked to write commands to navigate directories, list files, edit text files, redirect output, and more. They are also instructed to configure static and dynamic IP addresses using GUI mode, and to create a bash script that displays a welcome message on terminal startup and opens a browser page with their name. The script is to be configured to run automatically on boot.

Uploaded by

Manoj Kavedia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views11 pages

Experiment No 1

This document provides instructions for completing a practical assignment on Unix shell commands, static and dynamic IP addresses, and bash scripting in kiosk mode. Students are asked to write commands to navigate directories, list files, edit text files, redirect output, and more. They are also instructed to configure static and dynamic IP addresses using GUI mode, and to create a bash script that displays a welcome message on terminal startup and opens a browser page with their name. The script is to be configured to run automatically on boot.

Uploaded by

Manoj Kavedia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Smt.

Chandibai Himmatmal Mansukhani College


Practical – 01
Unix Shell Command , Static and Dynamic IP,Bash Script in Kiosk Mode

1 a. Edit text file with Nano and Cat Editor,Learn Sudo Previlege and unix shell
commands like cd, ls ,cat etc
i. Write Command to Display your current directory

ii Write Command to Change to /var/log directory

iii Write Command to Change to your home directory using only three key
press

iv Write Command to Goto home directory of your current directory

v Write Command to Goto the root directory


vi Write Command to List the content of root directory

vii Write Command to List the long listing of root directory

viii Write Command to Stay were you are and list the content of /etc directory

ix Write Command to Stay were you are and list the content of /bin and /sbin
directory

x Write Command to Stay were you are and list the content of /home/pi

xi Write Command to List all files including hidden file from your home
directory
xii Write Command to List long listing of configuration file in /etc in human
readable format

xiii Write Command to Create in one command the directories


~/tycs/iotbatch/yourrollno//prac1/1a (create subdirectories in the hierarchy
tree given)
[eg.tycs/iot11/rolno1111/prac1a/1a]

xiv Write Command to List the files of /usr/bin and redirect output to the file
in ~/mylisitng_rollno.txt

xv Write Command to Append the following in mylisting_rollno.txt and echo


it zzzz is not a real program here
xvi Write Command to Append the following in mylisting_rollno.txt using >>
& one more for luck

xvii Write Commad to Type :echo “–eaardvark\nplaytypus\njellyfish\


narrdvark”>list1
Sort the list1 and store them in file

xviii Write Command to Display first two line of List1 and redirect output to
list2

xix Write Command to Sort the content of list1and transfer unique content to
list2
xx Write Command to Compare list1,list2,list3 and list4 and if any error send
the errors to errors.txt

xxi Write Command to Copy the content of /etc/network/interfaces to


/etc.network/interfaces_rollno

xxii Write Command to Remove the file from /etc.network/interfaces_rollno


xxiii Write Command to Give all permissions to mylisitng_rollno.txt

1 b Learn to set dynamic and static IP.

1. Write Command to Update and Upgrade System


Step Write Command to Check IP of your System
-02

Step Configuring the Static IP (GUI Mode)


-03

Step Configuring the Dynamic IP(GUI Mode)


-04

Step Verifying the changes


-05
Reboot the system and verify the IP
1 c. Write the basic bash script.
Learn how to autostart on boot.
Terminal Should have welcome message and browser should open a page
processsing your name.
Create the file and Script.

Create Filename : _____________________ in your directory

Location :

Write Bash Script using nano Editor. File Name :


Configuring _______________ and _______________ for
startup(Autorun)

Grant all permissions to ________________

Verify / Test the Script

Add _____________ to ____________________

Open _________________________
At the end of _______________________insert filename along with path

Personalise the Prompt


In Bashrc goto line containing PS1=”pi@raspberryS” and change to
initials of your name followed by yourrollno@chmcs>

Reboot the system

For terminal to open on Reboot


Verify file of your terminal

Open the file_______________________in your nano editor

Content of the file


Date : Signature :

Batch : Roll No:

You might also like