fbpx
Lección 1, Tema 1
En progreso

Ejercicios Copy

Noel Urbina 27 julio, 2024

Ejercicio 1

En el directorio /home/user_name/, cree un archivo de script de shell, test.sh:

#!/bin/bash
echo current date/time is $(/bin/date) >> /home/hostadm/timecheck.txt
  1. Haz el script ejecutable
  2. En el directorio /lib/systemd/system, cree el archivo de servicio de la unidad, test.service
  3. Habilita el servicio test en systemd
  4. Ejecuta el siguiente comando
    1. systemctl start test
    2. systemctl status test
  5. Revisa si el archivo /home/user_name/timecheck.txt fue actualizado
  6. Reinicia la maquina virtual, y ejecuta el comando systemctl status test

Revisa si el archivo /home/user_name/timecheck.txt fue actualizado