MCSL-204 ENG (Jan 25 To July 25)
MCSL-204 ENG (Jan 25 To July 25)
s
6|Page
MCSL 204
PART-I: Windows 10
Question 1: For the following given tasks of Windows 10, write the step-by-step
procedure as well as attach the main screen shots:
a. Create a new user account, set a password, and switch between accounts.
1. Create a New User Account:
o Open Settings by pressing Windows + I.
o Go to Accounts > Family & other users.
o Under Other users, click on Add someone else to this PC.
o Choose whether you want to add a Microsoft account or a local user. For a local
user, select I don’t have this person’s sign-in information, then Add a user
without a Microsoft account.
o Enter a name for the new user, set a password (optional), and click Next.
2. Switch Between Accounts:
o Press Ctrl + Alt + Del, then select Switch user.
o Choose the account you want to switch to.
b. Change the desktop wallpaper, screen resolution, and add/remove desktop icons.
1. Change Desktop Wallpaper:
o Right-click on the desktop and select Personalize.
o Under Background, choose a new wallpaper or browse to an image file on your
computer.
2. Change Screen Resolution:
o Go to Settings > System > Display.
o Under Display resolution, choose your desired resolution from the dropdown.
3. Add/Remove Desktop Icons:
o Right-click on the desktop and select Personalize.
o Under Themes, click on Desktop icon settings.
o From here, you can add or remove icons like Computer, Network, Recycle Bin,
etc.
Pag e |7
MCSL 204
c. Create, rename, move, and delete folders and files. Explore different views in File
Explorer.
1. Create a Folder:
o Right-click in a location, choose New > Folder.
o Name your folder.
2. Rename a Folder/File:
o Right-click the folder/file and select Rename.
o Type a new name and press Enter.
3. Move a Folder/File:
o Drag the folder/file to the desired location or right-click it and choose Cut,
navigate to the new location, right-click, and choose Paste.
4. Delete a Folder/File:
o Right-click and select Delete or select it and press Delete on the keyboard.
5. Explore Different Views in File Explorer:
o Open File Explorer and click on the View tab.
o Choose between options like Details, Icons, List, or Small icons.
e. Explore system settings using both the Control Panel and the Settings app.
1. Control Panel:
o Type Control Panel in the search bar and select it.
s
8|Page
MCSL 204
o Explore various sections like System and Security, Hardware and Sound, etc.
2. Settings App:
o Press Windows + I to open Settings.
o Navigate to various sections like Privacy, System, Devices, etc.
g. Use the search bar in File Explorer to find specific files based on keywords or
extensions.
1. Use the Search Bar:
o Open File Explorer.
o In the search bar at the top right, type your search term or use *.ext (e.g., *.jpg)
to search for files with a specific extension.
h. Change file or folder permissions and test access using different user accounts.
1. Change Permissions:
o Right-click the file/folder and select Properties.
o Go to the Security tab and click Edit to modify permissions for users.
2. Test Access:
o Log in as a different user account and try accessing the file/folder to verify
permissions.
i. Recover deleted files from the Recycle Bin and permanently delete items.
1. Recover Deleted Files:
o Double-click the Recycle Bin on the desktop.
Pag e |9
MCSL 204
k. Create a system restore point and simulate restoring the system to a previous point.
1. Create a Restore Point:
o Search for Create a restore point in the Start menu.
o Under System Properties, click Create and follow the prompts.
2. Restore the System:
o Go to System Restore and select a restore point.
o Follow the instructions to restore the system to that point.
s
10 | P a g e
MCSL 204
o. Use the command prompt to view and note the IP address using the ipconfig command.
1. Open Command Prompt:
o Press Windows + R, type cmd, and press Enter.
2. View IP Address:
o In Command Prompt, type ipconfig and press Enter.
o Your IP address will be displayed under IPv4 Address.
2. Create a Playlist:
o In Windows Media Player, go to the Library tab, click Create Playlist, and add
your files to it.
q. Enable and test features like the Magnifier, Narrator, and On-Screen Keyboard.
1. Enable Magnifier:
o Press Windows + Plus to open the Magnifier.
2. Enable Narrator:
o Press Ctrl + Win + Enter to turn on Narrator.
3. Enable On-Screen Keyboard:
o Go to Settings > Ease of Access > Keyboard, then toggle On-Screen
Keyboard.
s
12 | P a g e
MCSL 204
PART-II: LINUX
Question 1:
Write the LINUX commands for the following:
a. Set the permissions of exam.txt so that only the owner can read and write, and others
have no access.
chmod 600 exam.txt
This command sets the file exam.txt permissions so that the owner has read and write
permissions (rw-), while all others have no permissions (---).
c. Change the owner of exam.txt to another user using chown (if allowed).
sudo chown username exam.txt
Replace username with the name of the user to whom you want to transfer ownership of
exam.txt.
e. Use the wc command to count the number of lines, words, and characters in exam.txt.
wc exam.txt
This command will output three values: the number of lines, words, and characters in exam.txt.
f. Find all occurrences of a specific word (e.g., "Linux") in exam.txt using grep.
grep "Linux" exam.txt
This will search for the word "Linux" in exam.txt and display all matching lines.
s
14 | P a g e
MCSL 204
Question 2:
a. Write a script to display numbers from 1 to 10 using a for loop.
Here is a simple shell script that uses a for loop to display numbers from 1 to 10:
#!/bin/bash
s
16 | P a g e
MCSL 204
How to use:
1. Save the script to a file, for example, compress_directory.sh.
2. Make the script executable by running:
chmod +x compress_directory.sh
3. Run the script by typing:
./compress_directory.sh
This will compress the ~/exam directory into a .tar.gz file located in your home directory
(~/exam.tar.gz).
c. Create a script that takes user input from the menu displayed and performs the
arithmetic operation like a simple calculator.
#!/bin/bash
read num2
result=$((num1 - num2))
echo "The result of subtraction is: $result"
}
menu() {
echo "Simple Calculator Menu"
echo "1. Add"
echo "2. Subtract"
echo "3. Multiply"
echo "4. Divide"
echo "5. Exit"
echo "Please select an operation (1-5):"
read choice
case $choice in
1) add ;;
2) subtract ;;
3) multiply ;;
4) divide ;;
5) echo "Exiting the calculator. Goodbye!"; exit 0 ;;
*) echo "Invalid option. Please choose a valid option."; menu ;;
esac
}
o divide(): This function divides two numbers, with a check to ensure that division
by zero doesn't occur.
2. Menu:
o The menu() function displays a list of options (Add, Subtract, Multiply, Divide,
Exit).
o The script reads the user's choice and calls the corresponding function based on
that input.
3. Main Loop:
o The while true loop keeps displaying the menu until the user chooses to exit by
selecting option 5.
How to use:
1. Save the script to a file, for example, simple_calculator.sh.
2. Make the script executable by running:
chmod +x simple_calculator.sh
3. Run the script by typing:
./simple_calculator.sh
The script will then display the menu and prompt the user to enter the desired operation. It will
continue to run until the user selects "Exit" from the menu.
s
20 | P a g e
MCSL 204
Explanation:
1. Directory Selection:
o The script prompts the user to input the directory they want to back up using the
read command.
2. Directory Existence Check:
o The script checks whether the specified directory exists using if [ ! -d
"$source_dir" ]. If the directory does not exist, it exits with an error message.
3. Current Date for Backup Filename:
o The script uses the date command to generate a timestamp (e.g., 2025-02-26_14-
30-00) to ensure that each backup has a unique filename.
4. Creating the Compressed Archive:
o The tar command is used to compress the specified directory into a .tar.gz file:
▪ c: Create a new archive.
▪ z: Compress using gzip.
▪ v: Verbose mode (show the files being archived).
▪ f: Specify the file name for the archive.
5. Completion Message:
o If the backup is successful ($? -eq 0), the script prints a success message with the
backup file name. Otherwise, it prints an error message.
How to Use:
1. Save the script to a file, for example, backup_directory.sh.
2. Make the script executable:
chmod +x backup_directory.sh
3. Run the script:
./backup_directory.sh
The script will prompt you to enter the path of the directory you want to back up. It will then
create a compressed .tar.gz archive with the backup, appending the current date and time to
the filename.
For example, if you backup a directory named ~/exam, the archive might be named
~/exam_backup_2025-02-26_14-30-00.tar.gz.
s