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?
sshdup 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
.bashrcmodify and it copy back (scp, sftp rsync ...). 3) you can log as another user and do
su -... 4) from another machine (even virtual) you can do
ssh user@host mv .bashrc bashrcToModifythen log, modify... 0) Before of all does
CTRL ALT F1work from the VM?
.bashrcwas 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 did
echo 'gnome-terminal' >> ~/.bashrc. Bad idea. I guess I should put
/etc/init.dor somewhere? I'm still trying to understand the boot process.