Can't access any System Programs and only login using Xorg

After a reboot I was not able to get into Fedora using the GUI(Gnome), I was typing my password then it loaded and then it just displayed my username again.

So I tried to login using STRG+ALT+F2 and it worked, the only problem is no command is working. If I type cd for example it just returns:

cd: command not found sometimes it tells me how to install the command and when I try to install it I get the message error this program already exist or something like that.

After that I tried getting into Fedora using Gnome with Xorg and it worked but all of my DNF apps are gone only flatpaks show up.

If I boot into Windows I can still read my drive using WinBTRFS so I still have my data of my linux partition but I can’t access Fedora any more.

pls help

Did you edit your bash configuration files (e.g. ~/.bashrc or ~/.bash_profile) before the reboot? Perhaps to change your PATH?

If so, you can restore the default files. In the tty (Ctrl-Alt-F2), type carefully:

/usr/bin/cp -bv /etc/skel/.bashrc /etc/skel/.bash_profile ~

Your existing files will be backed up with a ~ at the end of the filename.

1 Like

It’s odd for cd to be not found, because that command is a shell built-in (it has to be!).

It seems like something must be very messed up on your system. Can you tell us of anything that happened between when it last worked and when the problem appeared? Just the reboot, or anything else?

1 Like

Well I have a Dualboot and went into Windows and used WinBTRFS to list fedora in Windows Explorer but that worked all the time without issues, maybe that messed something up idk.

I looked into my history thanks for the /usr/bin/ trick btw. There I found that I tried to intall flutter and I typed
flutter doctor
That might have messed up everything.

If I echo $PATH
It returns:
/home/simon/.local/bin:/home/simon/bin:/usr/loc|al/bin:…: [PATH_OF_FLUTTER_GIT_DIRECTORY1/bin

I don’t know what flutter doctor does. But export only affects the current shell (and sub-shells); if you only ran it in the terminal, it would not have lasting effects after a reboot.

So, a statement modifying PATH must be saved somewhere and is being run in every shell. The statement doesn’t necessarily contain the string export , it could simply be PATH=....

You could try to find it with:

/usr/bin/grep 'PATH_OF_FLUTTER_GIT_DIRECTORY' /etc/bashrc /etc/profile /etc/profile.d/* ~/.bash* ~/.bashrc.d/*

That searches the typical locations of files loaded by bash, unless you (or flutter or something else) also modified it.

I don’t know if PATH_OF_FLUTTER_GIT_DIRECTORY is the actual string or you’re using a placeholder in your post, or if 1 is a typo of ]. Change the search accordingly.

1 Like

I found it in the /etc/profile
I just deleted it and it worked.

Thank you so much for your help!
Have a great day!

This often happens when the PATH variable is corrupt, due to a typo or an editor that inserts “look-alike” Unicode characters. In such cases, recovery requires some command-line skills.

My experience with workshops for a scientific package that requires linux has been that users had much better experiences (and were better able to install and maintain the software post-workshop) after when the workshop began with an introduction to the linux command-line such as Linux Command.

Flutter is a Google cross-plaform UI development kit. The string is a placeholder:
Flutter documentation for updating the PATH in linux.