How to log into terminal rather than window manager

Techforay

Member
Joined
May 13, 2020
Messages
36
Reaction score
17
Credits
363
I made a change to my .xinitrc file and when i log in to dwm window manager i get a blank screen. Is there a way i can log into terminal instead of DWM to correct the file.
 


If you can ssh from another computer...
sudo systemctl set-default multi-user.target
Reboot your linux system, it will boot to console.
after you fix the file. Run this.
sudo systemctl set-default graphical.target
Reboot, that will go back to xWindows.

Option 2.
At your grub menu, interrupt the grub boot, press "e" to edit
You will see multiple lines of stuff here.
Use the down arrow on your keyboard, go down to the line that starts with
linux ($root)/vmlinuz......
and probably ends with something like
...rhgb quiet
If you go down to the the line that starts with
initrd ($root)/initramfs
Then you went too far.
Just add a space then the number 3.
so the end of the vmlinuz line would look something like...
....rhgb quiet 3
Then press cntrl-x to start.
This should take you to a console.
 
If you can ssh from another computer...
sudo systemctl set-default multi-user.target
Reboot your linux system, it will boot to console.
after you fix the file. Run this.
sudo systemctl set-default graphical.target
Reboot, that will go back to xWindows.

Option 2.
At your grub menu, interrupt the grub boot, press "e" to edit
You will see multiple lines of stuff here.
Use the down arrow on your keyboard, go down to the line that starts with
linux ($root)/vmlinuz......
and probably ends with something like
...rhgb quiet
If you go down to the the line that starts with
initrd ($root)/initramfs
Then you went too far.
Just add a space then the number 3.
so the end of the vmlinuz line would look something like...
....rhgb quiet 3
Then press cntrl-x to start.
This should take you to a console.
Thank you for your help
 
For the purposes of repair, why not switch to a tty, e.g. Ctrl-Alt-F2.

Doesn't work in every DE. I wish it worked in MATE or even Gnome.
 
Last edited:
Doesn't work in every DE. I wish it worked in MATE or even Gnome.
I don't think it's dependent at all on the DE, rather it's part of the kernel. TTY2-6 are typically available in single-user and rescue modes (no GUI available). It works in both Gnome and MATE, as well as all other DEs I've used.

Thanks for your help. Can you suggest where to get training on TTY. I would like to learn more about this. I have never used this
A TTY is just a text terminal, upon which a shell (like bash) runs, and allows you to interface with your system. The TTYs accessible via Ctrl-Alt-F2 thru F6 are good for rescue mode stuff like what you're experiencing. F7 is typically your GUI. So you Can switch to a text TTY, do something, then return to your GUI easily.
 
I don't think it's dependent at all on the DE, rather it's part of the kernel. TTY2-6 are typically available in single-user and rescue modes (no GUI available). It works in both Gnome and MATE, as well as all other DEs I've used.

Works in Slackware here, doesn't work in Alma or Fedora no matter which DE I use.
 
Works in Slackware here, doesn't work in Alma or Fedora no matter which DE I use.
That's really odd. I am on Fedora Workstation (Gnome + Wayland) and CTRL+ALT+F3 to F6 switches to TTYs from TTY3 to TTY6.

CTRL+ALT+F1 shows a blinking cursor for some reason, and CTRL+ALT+F2 is where the display manager is (it gets me back to my Gnome session).

Maybe you're just trying to switch to a TTY where your DM already is?
 
As @gvisoc pointed out, it's not F2 - usually (in any of the distros I'm familiar with). It starts at F3. For some reason, I'm pretty sure Ubuntu used to go to F7, but I usually get back to my desktop with the ALT + RIGHT ARROW method.
 

Staff online

Members online


Top