Configure systemd to output text to the console instead of reboot.

    First, create a shell script to generate the output and send it to the console.

    mkdir /etc/scripts
    
    cat << EOF > /etc/scripts/ctrl-alt-del.sh 
    #!/bin/sh
    
    /bin/echo "" > /dev/console
    /bin/echo "Nope. This isn't Windoze." > /dev/console
    EOF

    Next, create the two systemd files.

    rm -f /lib/systemd/system/ctrl-alt-del.target 
    rm -f /lib/systemd/system/ctrl-alt-del.service
    
    cat << EOF > /lib/systemd/system/ctrl-alt-del.target
    [Unit]
    DefaultDependencies=no
    Description=Ctrl-Alt-Del
    Requires=ctrl-alt-del.service
    StopWhenUneeded=yes
    EOF
    
    cat << EOF > /lib/systemd/system/ctrl-alt-del.service 
    [Service]
    DefaultDependencies=no
    Type=oneshot
    ExecStart=/etc/scripts/ctrl-alt-del.sh
    EOF
    

    Finally, reload the systemd daemon.

    systemctl daemon-reload
    
    

    No questions yet.