Linux exercises
Mon Mar 13 2023 18:55:52 GMT+0000 (Coordinated Universal Time)
Saved by @mtommasi
Sure! Here are some exercises for you to practice those specific commands: ps command: Use the ps command to list all processes currently running on your system. Use the ps command with the -ef option to display all processes and their associated details. Use the ps command with the -u option to display processes for a specific user. Use the ps command with the --sort option to sort the output by a specific field, such as --sort=-%cpu to sort by CPU usage in descending order. top command: Use the top command to display a real-time view of the processes currently running on your system. Use the top command with the -d option to set the refresh interval. Use the top command with the -u option to display processes for a specific user. Use the top command with the -p option to display processes for a specific process ID (PID). crontab command: Use the crontab -l command to list all existing cron jobs for the current user. Use the crontab -e command to edit your user's cron jobs. Use the crontab -r command to remove all cron jobs for the current user. at command: Use the at now command to schedule a command to run immediately. Use the at 10:30 command to schedule a command to run at a specific time. Use the at -l command to list all scheduled at jobs. Use the atrm command to remove a scheduled at job. kill command: Use the ps command to find the process ID (PID) of a process you want to terminate. Use the kill PID command to terminate a process by its PID. Use the killall processname command to terminate all processes with a specific name. systemctl command: Use the systemctl status servicename command to check the status of a service. Use the systemctl start servicename command to start a service. Use the systemctl stop servicename command to stop a service. Use the systemctl enable servicename command to enable a service to start automatically on boot. Use the systemctl disable servicename command to disable a service from starting automatically on boot. I hope these exercises help you practice and become more comfortable with these specific Linux commands! Yes, there are several websites where you can find Linux command exercises to practice: OverTheWire: This website offers several Linux-based challenges for beginners and advanced users. The challenges involve using Linux commands to navigate through various levels. Linux Journey: This website provides a comprehensive guide to learning Linux. It includes interactive exercises that allow you to practice Linux commands. ShellCheck: This website offers a collection of shell scripts with errors that need to be fixed. This allows you to practice using Linux commands to debug and fix issues in shell scripts. CyberChef: This website provides a collection of tasks and challenges that involve using Linux commands to process and manipulate data. HackerRank: This website offers coding challenges in various programming languages, including Linux shell scripting. The challenges involve using Linux commands to solve problems. These websites provide a fun and engaging way to practice Linux commands, improve your skills, and prepare for real-world scenarios.
Comments