A legacy app has no systemd unit and must survive SSH logout while you build one. What quick options do you have?
BeginnerScenarioProcesses, services and systemd
Answer
Situation read → Detach the process from the terminal for now.
What I'd do →
tmux new -s legacythen run it; detach withCtrl+b d.- Or a transient systemd unit, which is better:
sudo systemd-run --unit=legacy-app --uid=appuser /opt/legacy/run.sh
journalctl -u legacy-app -f
nohup ./run.sh > out.log 2>&1 &as a last resort.
Why → systemd-run gives logging and control (systemctl stop legacy-app) without writing a file.
Interview tip → Mention SIGHUP: closing the terminal sends it, which is why plain & processes die.
More on Processes, services and systemd
Your team has a Python API that someone starts with `nohup python app.py &`. Make it a proper service running as a non-root user.BeginnerThe service you created must bind to port 443, but it runs as a non-root user. How?BeginnerYou need to change one setting (memory limit) in a vendor-supplied unit file without editing it. How?BeginnerA service depends on a database on the same host and fails at boot because the DB isn't ready. How do you fix the ordering?IntermediateA service keeps crashing and systemd stops restarting it after a few attempts. How do you tune this?IntermediateA long-running app must reload its config without dropping connections. How do you wire this into systemd?Intermediate