- Basic Commands
- Task 1: Write commands to navigate to your home directory and list all files and directories.
- Expected Output:
Contents of Home Directory: Desktop Documents Downloads Music Pictures Videos - Task 2: Write commands to create a directory named
Assignment1in your home directory and navigate into it.- Expected Output:
Directory 'Assignment1' created. Current directory: /home/user/Assignment1 - Task 3: Write commands to create a file named
file1.txtand write “Hello, Linux!” into it.- Expected Output:
File 'file1.txt' created with content: Hello, Linux! - Task 4: Write commands to rename
file1.txttonewfile.txt.- Expected Output:
File 'file1.txt' renamed to 'newfile.txt'. - Task 5: Write commands to delete the file
newfile.txt.- Expected Output:
File 'newfile.txt' deleted.
- Expected Output:
- File Permissions and Ownership
- Task 6: Write commands to display the permissions of a file
example.txtand change its permissions to read-only for all users.- Expected Output:
Current permissions of 'example.txt': -rw-r--r-- Permissions changed to read-only for all users. - Task 7: Write commands to change the ownership of a file
example.txtto userjohnand groupusers.- Expected Output:
Ownership of 'example.txt' changed to user: john, group: users.
- Expected Output:
- Processes and Jobs
- Task 8: Write commands to display all running processes.
- Expected Output: (Sample output with process details)
- Task 9: Write commands to find and kill a process named
firefox.- Expected Output:
Process 'firefox' killed. - Task 10: Write commands to run a command
ls -lin the background and list all background jobs.- Expected Output:
Command 'ls -l' running in background. Background jobs: [1]+ Running ls -l &
- Expected Output:
- File System Navigation and Manipulation
- Task 11: Write commands to navigate to the root directory and list all files and directories.
- Expected Output:
Contents of Root Directory: bin boot dev etc home lib media mnt opt proc root run sbin srv sys tmp usr var - Task 12: Write commands to create a symbolic link named
link1pointing to a filefile2.txt.- Expected Output:
Symbolic link 'link1' created pointing to 'file2.txt'. - Task 13: Write commands to compress a directory
Folder1into aFolder1.tar.gzarchive.- Expected Output:
Directory 'Folder1' compressed into 'Folder1.tar.gz'. - Task 14: Write commands to extract contents from
Folder1.tar.gzinto a directory namedExtracted.- Expected Output:
Contents extracted from 'Folder1.tar.gz' into 'Extracted' directory.
- Expected Output:
- Networking
- Task 15: Write commands to display network interfaces and their IP addresses.
- Expected Output: (Sample output with interface details)
- Task 16: Write commands to ping
google.comand display the result.- Expected Output: (Sample output showing ping statistics)
- Task 17: Write commands to display the contents of
/etc/hostsfile.- Expected Output: (Contents of
/etc/hostsfile)
- Expected Output: (Contents of
- Shell Scripting
- Task 18: Write a shell script to accept a number as input and display its factorial.
- Expected Output: (Sample output showing factorial calculation)
- Task 19: Write a shell script to accept a filename as input and check if it exists in the current directory.
- Expected Output: (Sample output indicating file existence)
- Task 20: Write a shell script to list all
.txtfiles in the current directory and count them.- Expected Output: (Sample output showing list of
.txtfiles and count)
- Expected Output: (Sample output showing list of
Latest posts by Mahesh Wabale (see all)
- Logic Building Assignments – 2025 - October 15, 2025
- Create Your First Ansible Playbook: Step-by-Step Guide - September 29, 2025
- Ansible Beginner’s Guide – What is Ansible & Step-by-Step IT Automation - September 9, 2025