0% found this document useful (0 votes)
16 views5 pages

Tutorial 01 Linux

The document outlines a training module for an Introduction to Linux and bash basics course at IIT Roorkee, detailing tasks and quizzes for students to complete using Linux desktops. It emphasizes the importance of creating directories, customizing the desktop environment, and performing various command line operations. Additionally, it includes policies on seeking help and the use of AI, along with practical exercises to enhance students' understanding of Linux functionalities.

Uploaded by

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

Tutorial 01 Linux

The document outlines a training module for an Introduction to Linux and bash basics course at IIT Roorkee, detailing tasks and quizzes for students to complete using Linux desktops. It emphasizes the importance of creating directories, customizing the desktop environment, and performing various command line operations. Additionally, it includes policies on seeking help and the use of AI, along with practical exercises to enhance students' understanding of Linux functionalities.

Uploaded by

hitsk27
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Training module: Introduction to Linux and bash basics

Advanced Computational Techniques PHT-112


Dept. of Physics, IIT Roorkee
28 January 2026

1. Use the designated Linux desktops in the computer lab in the physics dept. and / or your personal
laptop to finish this module.

2. Go to the user’s home directory. Create a directory with the name PHT-112-2026 Your Name Enrollment No.
This is going to be your base directory for doing the modules in this course.

3. Go to your base directory. Create another folder with the name Your Name Enrollment No 2026-01-28.
This is your working directory for today’s lab. Do all the exercises inside it.

4. At the end of the lab session, zip the working directory to the google drive link provided to you.

5. Very important! Use comments to explain your answers.

6. Policy on online help and use of AI: You may look up internet to know about usages of linux commands.
However, taking help of AI to write the codes (if any) will enable the AI company to train their AI
model, but it will not help you learn. So taking help of AI is not allowed except for search.

Linux desktop session basics


1. Quiz: Which of the following is a popular desktop environment and graphical user interface (GUI) that
runs on top of the Linux operating system?

(i) Fedora
(ii) GNOME
(iii) SUSE
(iv) Debian

2. Quiz: What action saves the current state of the system in RAM?

(i) Switching user


(ii) Suspending
(iii) Shutting down
(iv) Logging out

3. Quiz: What keyboard shortcut is used to lock the screen?

(i) CTRL–SUPER–ALT–L
(ii) SUPER–L
(iii) CTRL–ALT–F7

1
(iv) CTRL–ALT–DEL

4. Quiz: Which of the following steps initiates changing the desktop background?

(i) When logging in, before typing your password, click on the upper right corner
(ii) Right-click on the desktop and select Change Desktop Background.
(iii) Reinstall the system.
(iv) None of the above.

5. Task: customize the desktop Linux is so customizable, probably very few people stay with the default
look and feel of the desktop. You may as well get started now in making your desktop reflect your likes
and personality.
Even if the underlying code base is the same, because of the diversity of Linux distributions and versions,
and because they each customize their desktops, there are many variations on ways to customizing the
desktop, they are susceptible to change every time a new version of a Linux distribution is released. For
the most part, this is not a problem. Graphical interfaces are designed to be easy to navigate and figure
out, and they really do not vary very much, not only from one distribution to another, but even between
operating systems. So, the only way you can get more adept at working efficiently on your desktop is to
simply explore, play, and modify.

(a) Change the desktop background to something that better suits your tastes; perhaps one of the
provided backgrounds, solid color of your choice, or a personal picture that you can upload.
(b) Select a theme from the available themes for your distribution that, again, suits your tastes and
personality. Have fun and explore with this exercise.

6. Quiz: Which of the following are possible CLI utilities in Linux?

(i) gnome-terminal
(ii) konsole
(iii) terminator
(iv) moba x-term
(v) all of the above

7. (a) Task: Using the GUI, launch the command line interface (CLI).
(b) Task: Lanuch a new CLI from a currently used CLI.

8. Task: login, logout: Describe how do you log in and log out of a linux desktop session and shutdown the
machine using

(a) the GUI.


(b) the CLI.

0.1
Quiz: shutdown Assuming you are the root user, which commands allow you to shut down your system
without rebooting? Select all answers that apply.

1. halt
2. shutdown -r now
3. poweroff
4. shutdown -h now

Page 2
9. Task: finding and launching the default web browser

(a) Task: Using the GUI, find the default web browser.
(b) Task: Launch the default web browser using
(i) the GUI.
(ii) the CLI.

Everything is file!
1. Quiz: Which of these are default directories available under the Home directory? Select all answers that
apply.

(a) Desktop
(b) Documents
(c) Root
(d) Downloads

2. Quiz What is the default text editor in GNOME?

(a) gedit
(b) Notepad
(c) Nautilus
(d) reddit

3. Task: Working with files and directories at the Command Prompt

(i) Using touch, create file1 and file2 (two empty files).
(ii) Check for the existence of file1 and file2 using ls -l.
(iii) Rename file1 to new file1 using mv.
(iv) Remove file2 using rm without any options.
(v) Remove new file1 using rm without any options.
(vi) Create a directory named dir1, using mkdir.
(vii) Remove dir1 using rmdir without any options.

4. Task: Recovering deleted files using GUI and command prompt: The basic operations are the same
whether you are using a GNOME or KDE desktop environment, although the exact procedures and menu
choices may differ slightly.

(iv) Create a new text file on the Desktop named [Link] using the graphical file manager.
(iv) Delete the file by sending it to the Trash.
(iv) Verify that the file is now located in ~/.local/share/Trash or one of its subdirectories. Note:
You may need to configure your file browser to display hidden files and directories (those beginning
with a .).
(iv) Recover the file and ensure that it is restored to its original location. Use GUI and CLI.

5. Task: Viewing file sort options Find the latest modified file in /var/log using

1. the GLI
2. the CLI [hint: use ls with appropriate options.]

Page 3
6. Creating, moving and removing files

(a) Task: Create an empty file named [Link] and move this file to the /tmp directory, using a
relative pathname from your home directory. Then, delete this file using an absolute pathname.
(b) Task: white space in file name: Create and empty file named exercise [Link]. Verify that it has
been created using ls.

7. Task: Using bash wildcards with ls

(a) View all the files in the current directory using ls command with -a option.
(b) List (using ls) files with names starting with g and containing five letters.
(c) List (using ls) files whose names begin with mk and end with any characters.
(d) List (using ls) files having five letter names starting with g and second character between a-n.
(e) List (using ls) five letter named files starting with g and not having the second character between
a-m.

8. Quiz: understanding file organization: Which of the following are examples of an absolute path? Select
all answers that apply.

(a) /etc/passwd
(b) ../passwd
(c) //etc/passwd
(d) \\passwd

9. Quiz: Which commands allow you to locate programs? Select all answers that apply.

(a) whichis
(b) which
(c) whichever
(d) whereis

10. Task: viewing output of a file from command line: Using gedit, create a new file and write the integers
0-10 (one number per line) and save the file. Display the content of the file on stdout as follows:

(a) Using head, show the first 4 lines.


(b) Using tail, show the last 5 lines.
(c) Using a combination of head and tail, show the 6th line.
(d) Describe the difference in the output of cat and tac.
(e) Using less.

Quiz: Which of the above commands are convenient for (i) small and (ii) large files? How small is small
and how large is large?

11. Quiz: Using which command can you forcefully remove a directory recursively?

(a) rmdir
(b) rm -rf
(c) rmdir -f
(d) mv -rf

12. Quiz Which bash wildcard is used to match any single character?

Page 4
(a) *
(b) @
(c) ?
(d) #

13. Quiz: Which command is used to perform a database search of pathnames given the substring that is
provided as a parameter?

(a) locate
(b) updatdb
(c) find
(d) whereis

Page 5

You might also like