I fear that we may be focusing on the wrong issue here; the PATH variable has no impact on whether the operating system is able to boot into the graphical desktop, so something else must have changed. It looks like you tried to install NVM (Node Version Manager) but that has no impact on this either.
Would you be willing to re-install the OS from scratch? It might just be the fastest solution, as we're otherwise chasing ghosts that may or may not have something to do with this.
If you have important data you can still back it up to an external drive using the command line; I would suggest doing that anyway just in case something else we try breaks things further (hard to do at this point anyway, but just to be safe).
Let me know if you need help with that. Basically, when you plugin an external drive you can inspect where it's mounted at by running the command /usr/lib/lsblk
. Note that since that the PATH variable is broken you need to specify the full location to the executable. This would show something like this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 931,5G 0 disk
└─sda1 8:1 0 931,5G 0 part /media/zenzen/TOSHIBA EXT
zram0 251:0 0 7,7G 0 disk [SWAP]
nvme0n1 259:0 0 232,9G 0 disk
├─nvme0n1p1 259:1 0 300M 0 part /boot/efi
└─nvme0n1p2 259:2 0 232,6G 0 part /
In my case, my Toshiba external drive is mounted at /media/zenzen/TOSHIBA EXT
. You can then copy files with /usr/bin/cp
to copy the files you want to back up to the external drive. To copy entire directories instead of individual files, pass the -r
flag: /usr/bin/cp -r
For now, back to the PATH issue:
We've removed your own .bashrc
profile from the equation so this is all that's left. It makes sense that it shows something but it's unexpected that it's only this; I would expect to show all the usual directories that we've tried to include manually.
Let's try once again to re-create the .bashrc
file. You can use nano
to create the file from the terminal:
/usr/bin/nano $HOME/.bashrc
And write just the following lines.
. /etc/bash.bashrc
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Save the changes by pressing Ctrl+O and exit nano
by pressing Ctrl+X. Now you can logout and log back in again, hopefully this has amended the problem (at least temporarily).
My next step would be to try re-installing the graphical desktop in case it was removed or broken somehow. As I said, none of the above has any relation with the graphical desktop, which points to something else more drastic broken.
sudo apt install --reinstall zorin-os-desktop
Or, if this produces no results or claims that this package is not installed:
sudo apt install zorin-os-desktop