Linux Fundamentals - Solution – Script with Environment Variables Access

Linux Fundamentals - Solution – Script with Environment Variables Access

Assessment

Interactive Video

Information Technology (IT), Architecture

University

Hard

Created by

Quizizz Content

FREE Resource

The video tutorial guides viewers through creating and editing a shell script file, setting and modifying file permissions, and executing the script. It covers exporting variables, using the nano editor, and employing chmod to adjust permissions. The tutorial concludes with running the script and verifying its access to environment variables.

Read more

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the first step in creating a new shell script file?

Set file permissions

Use the touch command to create the file

Run the chmod command

Edit the file with a text editor

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which command is used to change file permissions in Unix-like systems?

chmod

nano

ls

export

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'X' permission allow a user to do with a file?

Read the file

Write to the file

Execute the file

Delete the file

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you run a shell script using a relative path?

By typing the script name directly

By using 'execute script.sh'

Using the command 'run script.sh'

By using './script.sh'

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the script demonstrate by displaying the user's name in the terminal?

The script can create new directories

The script can access environment variables

The script can delete files

The script can modify system files