How to Kill X service permanently in ubuntu server

0

When I attempt to stop or kill the X service using the PID command on the Ubuntu server, it temporarily stops, but after a few minutes, it automatically appears again. It doesn't seem to work as expected. please suggest any way to resolve it.

Rj
asked 3 months ago131 views
2 Answers
0

Which process is it that you're trying to kill? If it's launched by a service that's under systemd control, then it may be set to automatically restart on failure.

This Red Hat document explains it in more depth, I know you're running Ubuntu but they both use systemd https://www.redhat.com/sysadmin/systemd-automate-recovery

profile picture
EXPERT
Steve_M
answered 3 months ago
0

X service is associated with graphical desktop environment for GUI. Your Ubuntu probably have GUI installed. If you do not need GUI, you can switch from graphical.target to multi-user. target with the command

sudo systemctl isolate multi-user.target

To set this permanently,

sudo systemctl set-default multi-user.target
AWS
EXPERT
Mike_L
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions