quiz image

Linux LPIC-1 107.2: Scheduling Jobs with at Command

GuiltlessAshcanSchool avatar
GuiltlessAshcanSchool
·
·
Download

Start Quiz

Study Flashcards

5 Questions

What is the purpose of the -6 option in the route command?

To specify the IPv6 protocol

What is the result of running the ping6 command without a valid route to the destination?

The command will display a 'Network is unreachable' error

What is the purpose of the ip route add command?

To add a new route to the routing table

What is the result of deleting a route from the routing table using the route -6 del command?

The route is permanently deleted from the routing table

What is the difference between the route and ip route commands?

The route command is used for IPv4, while the ip route command is used for IPv6

Study Notes

Scheduling Jobs with at

  • Valid time specifications for at include: at 08:30 AM next week, at midday, at now +4 days, at tomorrow 08:30 AM
  • Invalid time specifications for at include: at 01-01-2020 07:30 PM, at 21:50 01.01.20, at 10:15 PM 31/03/2021

Reviewing and Deleting at Jobs

  • To review at job commands, use at -c
  • To review pending at jobs, use at -l or atq
  • To delete at jobs, use at -d or atrm

Using systemd-run as an Alternative to at

  • systemd-run can be used to schedule one-time jobs, similar to at
  • Example: # systemd-run --on-calendar='2019-10-06 11:30' date to run the date command at 11:30 AM on 2019/10/06
  • Example: # systemd-run --on-active="2m" ./foo.sh to run the foo.sh script after 2 minutes

Reviewing systemd-run Logs

  • systemd-run logs are stored in the systemd journal
  • To review logs, use the journalctl command

Viewing Routing Tables

  • netstat -r, ip route, and route commands are used to view the routing table.
  • The output of these commands displays the destination, gateway, genmask, flags, and interface.
  • The ip route command does not show IPv6 routes by default; use ip -6 route to view IPv6 routes.
  • The route -6 and netstat -6r commands are used to view IPv6 routing tables.

Flags Column

  • The U flag indicates that a route is up.
  • The ! flag means reject route, i.e., a route with a ! won't be used.
  • The n flag means the route hasn't been cached.
  • The G flag indicates a gateway.

Metric or Met Column

  • The Metric or Met column refers to the administrative distance to the target.
  • This administrative distance is used by routing protocols to determine dynamic routes.

Adding and Deleting Routes

  • The route -6 add and ip route add commands are used to add routes.
  • The route -6 del and ip route del commands are used to delete routes.
  • Adding a route can make a network reachable, while deleting a route can make a network unreachable.

Guided Exercises

  • The ip link and ip addr commands can be used to list network interfaces.
  • An interface can be temporarily disabled using the ip link set dev down command and re-enabled using the ip link set dev up command.
  • A reasonable subnet mask for IPv4 is 255.255.255.0.
  • The netstat -r, ip route, and route commands can be used to verify the default route.
  • A second IP address can be added to an interface using the ip addr add command.

Explorational Exercises

  • The ip link add command can be used to configure VLAN tagging.
  • A default route can be configured using the ip route add command.
  • Detailed information about the ip neighbour command can be obtained using the ip neighbour help command.

Learn to automate system administration tasks by scheduling jobs using the at command in Linux. Practice exercises to master LPIC-1 certification.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free

More Quizzes Like This

Localization Pop Quiz 2
5 questions

Localization Pop Quiz 2

GuiltlessAshcanSchool avatar
GuiltlessAshcanSchool
Cron Pop Quiz
5 questions

Cron Pop Quiz

GuiltlessAshcanSchool avatar
GuiltlessAshcanSchool
alias Pop Quiz
5 questions

alias Pop Quiz

GuiltlessAshcanSchool avatar
GuiltlessAshcanSchool
LPIC-1: Configuring Printers
80 questions

LPIC-1: Configuring Printers

GuiltlessAshcanSchool avatar
GuiltlessAshcanSchool
Use Quizgecko on...
Browser
Browser