Unable to login after change to /etc/profile

I am new to manjaro and I was setting up the my work environment. I was installing flutter and in the process of doing so there was one step I updated the /etc/file with the PATH string and then I was supposed to reboot. When I did so, I tried to login I couldn’t login the screen froze.

I tried to use sudo or any other solution available online but I am unable to solve the issue.

I would like any solution that can restore without loosing my settings.

What’s in your /etc/profile now?

The added PATH string I added. I can’t access it right now to be able to remove it.
You can find the string from https://flutter.dev/docs/get-started/install/linux

I think modifying your .bashrc (or .zshrc, etc.) should be enough, and there is no need to modify /etc/profile. So I suggest you revert the changes made to /etc/profile, and modify PATH in the shell’s rc file:

$ cat ~/.bashrc
export PATH="$PATH:<flutter-bin>"

The problem is that I can’t use sudo, nano, cat to make the changes from the tty screen. That’s where I am trying to make the changes from. Because I can’t get in the system

I also need the changes I made in the /etc/profile so that it can go back to the original state then I can continue with the installation

In that case I suggest you boot into a live session with the installation medium, mount the appropriate file system, and then you’ll be able to modify the profile file.

I will try that. I have a bootable USB I used while installing, but it doesn’t give me the option to run the live version upon booting from the USB.
I will do more research on how to do it

@WCanirinka, Hi and welcome to the forum :+1:

Just like @pobrn suggested you can try to mount your / partition of your install using a live medium (USB/DVD).

  1. Boot using a live medium (USB/DVD).
  2. Perform in a terminal: systemd-mount /dev/(your_instalations_root_partition) /mnt
  3. That profile file should now be accessible at /mnt/etc/profile

If you are able to boot your system, but just not login to your user account, then you could switch to a text console CTRL+ALT+Fn where Fn is between F1-F6.
Then login as root with the root password, to access that profile file…

PS: I fixed the topic title to be better english :wink:

Thanks for the solution.