How do I kill the x-server?
- Use ctrl+alt+F1 to switch to terminal,
- login
- run
sudo service lightdm stop
, lightdm and xserver should be stopped now (check with ctrl+alt+F7, which is your current xorg session, it should not show any desktop now) - do your things
- run
sudo service lightdm start
to start lightdm and xorg again.
Good Luck!
I did a little more digging around and found that I could just use pgrep to find its PID and then kill it.
pgrep dm -l
sudo kill (insert PID here)
You will need the help of htop
or top
. Write down the PID number of the process you want to kill (in this case, Xorg
). Once you have the PID, run the below command in a root shell (sudo -s
):
kill -9 <PID>
For example:
kill -9 1234
You should then be able to install the NVidia drivers.