PRACTICAL WORK FOR LINUX in Devops
Exercise 1. Rebooting the computer into Linux
Log in.
Display the current day, date, time, and year.
Display a list of all the people, or users, who are currently using the machine
Display The following information:
your username
the terminal your logged in
The time your logged in
Exercise 2: File Permissions & User Management
Tasks:
1. Create a deployment script: touch [Link]
2. Check permissions: ls -l [Link]
3. Make it executable: chmod +x [Link]
4. Add some content: echo '#!/bin/bash' > [Link]
5. Add more: echo 'echo "Deploying application..."' >> [Link]
6. Run it: ./[Link]
7. Check current user: whoami
8. View user groups: groups
Exercise 3: Process Management & System Monitoring
Tasks:
1. Check running processes: ps aux | grep bash
2. View real-time system resources: top (press 'q' to quit)
3. Check memory usage: free -h
4. Check disk space: df -h
5. Start a background process: sleep 100 &
6. List background jobs: jobs
7. Find the process ID: ps aux | grep sleep
8. Kill the process: kill [PID]