17
4
This is probably a duplicate question, but I'm not familiar enough with the login/boot process of CentOS (especially on a VM) to know what to search for.
I'm running CentOS 7 in VirtualBox. I accidentally appended gnome-terminal
to the end of my ~/.bashrc
file. So now a terminal window pops up when I log in. That terminal session executes .bashrc
, which opens another window, etc. etc., and I'm flooded with a ton of gnome-terminal
terminal windows.
I'm trying to log into a terminal session without the GUI login (so gnome-terminal
fails), but I can't get it to boot without the GUI. I've tried using the answers to this question, with no success. I get a GUI login every time: How to Boot CentOS in CLI?. Is there another way to edit the grub configuration at boot, or a way to get to a new terminal instance from the GUI login, like Ctrl+Alt+F1 in Ubuntu? (Yes, I tried it. It either doesn't work in CentOS 7, or it doesn't work in a VirtualBox VM.) Or is there some other way I can get a terminal session without a GUI, so I can edit my .bashrc
and fix this mess?
4
Is
– Hastur – 2017-12-14T01:40:49.927sshd
up on that VM? Many ways. 1) Start as Single user mode (e.g. enter at boot time, select the kernel, press a, append single, enter...) 2) if in your VM system run sshd you can try to copy your.bashrc
modify and it copy back (scp, sftp rsync ...). 3) you can log as another user and dosu -
... 4) from another machine (even virtual) you can dossh user@host mv .bashrc bashrcToModify
then log, modify... 0) Before of all doesCTRL ALT F1
work from the VM?2When you say "accidentally appended gnome-terminal", how did that happen? – mcfedr – 2017-12-14T21:31:05.620
@mcfedr I was waiting for someone to ask XD . I misunderstood what
.bashrc
was for. I thought it was run once at login, but it's run every time any shell session is started. I wanted a terminal window to pop up every time I signed in, so I didecho 'gnome-terminal' >> ~/.bashrc
. Bad idea. I guess I should putgnome-terminal
in/etc/init.d
or somewhere? I'm still trying to understand the boot process. – Michael Hoffmann – 2017-12-14T21:41:00.813