A good thing i like in BackTrack was it boot in console mode. It is quite helpful if we have to run few console commands instead of using full GUI.
But Kali linux directly boot into graphical mode. To make it boot into command line mode we need to remove auto start of xdm service (or kdm or gdm based on your desktop manager) from current runlevel.
To do it first we need to know current runlevel. Issue following command
$ who -r
Remember your current runlevel from output of previous command. Mine is 2.
We also need to know service name of display manager we are running, check it with following command (replace 2 with your run level)
$ chkconfig --list | grep '2:on'
It will list all services set to autostart for run level 2. Look here for entry similar to gdm or kdm or xdm etc. I am running gdm3.
Ok, now we have identified which service (gdm3 in my case) we have to turn off at which run level (mine is 2).
Now issue following command to stop gdm3 service for run level 2.
$ chkconfig --level 2 gdm3 off
Now on next boot it will boot into command line login. After login use startx command to start xsession.
Failsafe: If something went wrong or later you decided to boot again into graphical mode, revert it back with following
$ chkconfig --level 2 gdm3 on
Note: I do not remember if chkconfig is pre-installed with Kali or i installed it manually. In case it say ‘chconfig command not found’ then you can install it with following command
apt-get install chkconfig
That’s all. Happy pentesting with Kali linux 🙂
Thanks!
Excellent.Thanks !
Hey, that’s great! It works pretty fine, don’t know why I couldn’t think of that! Had to google all the way until bumped into here. Thanx for saving me lots of time.
You are welcome!
There’s a new version of something or another now where this locks me out of the computer. The login screen still shows up and it fails to authenticate my login attempts.
Pingback: Boot KALI Linux in command line mode | KTech Share
No need for this just type $ sudo vi /etc/default/grub then comment that two: GRUB_CMDLINE_LINUX_DEFAULT=”quiet”
GRUB_CMDLINE_LINUX=”initrd=/install/gtk/initrd.gz”
And put this right above:
GRUB_CMDLINE_LINUX=”text”
Below where it says: # Uncomment to disable graphical terminal (grub-pc only)
uncomment this:
GRUB_TERMINAL=console
EXTREMELLY SIMPLE, much better. No need for all that commands.
“And put this right above:” – right above what ?
No need for this just type $ sudo vi /etc/default/grub then comment that two: GRUB_CMDLINE_LINUX_DEFAULT=”quiet”
GRUB_CMDLINE_LINUX=”initrd=/install/gtk/initrd.gz”
And put this right above:
GRUB_CMDLINE_LINUX=”text”
Below where it says: # Uncomment to disable graphical terminal (grub-pc only)
uncomment this:
GRUB_TERMINAL=console
EXTREMELLY SIMPLE, much better. No need for all this commands.
None of these works. Never thought I would have a hard time booting linux to command line.
I run kali live off a USB without persistence, will I have to do this every time?
Ya, Without persistence you have to do it every time.
Another option is, during boot, when grub menu appear, edit it (press e with that entry hilighted) and add ‘quiet’ parameter to grub cndline then boot. It will save you from making those changes and rebooting again.
i have a problem. what can i do?
Problem: http://i.stack.imgur.com/shZnM.jpg
Link: http://unix.stackexchange.com/questions/275635/deleting-a-user-root-user-not-opening-after-login-in-kali-2?noredirect=1#comment478922_275635
Doesn’t work with latest version of kali-linux. You keep entereing graphical interface, whatever you do 😦
Yeah, I can’t get any of these to work either. The only thing I managed to change was the color scheme of the page where you select what to boot
chkconfig is depreciated, and thus is no longer supported.
So instead of using that install sysv-rc-conf
Command `apt-get install sysv-rc-conf`
and repeat the steps mentioned above the same way
For example
sysv-rc-conf –level 2 gdm3 off
Hi there Kali napcakes c”,)
To get Kali to boot into console mode:
(useful on slow and bad hardware such as ARM Raspberry Pi)
Just simply run the following commands:
1: root@kali:~# systemctl get-default
2: root@kali:~# systemctl set-default multi-user.target
3: root@kali:~# sudo reboot
After you reboot Kali will start in consol mode everytime after this.
To revert these changes, all you have to do is use this command:
root@kali:~# systemctl set-default graphical.target
root@kali:~# sudo reboot
After a reboot Kali will start normaly with GUI login screen everytime again.
Good luck champ!
/cheers