I have this strange issue when i login to my Fedora 37 using ssh or tty, I get this:
“bash: n: command not found…”
I looked trough .bashrc, .bash_profile, /etc/bashrc, but cant find any “n” hanging in those files, where can i look for this?
Thank you.
Thank you for the input, I never had n - node version manager installed in my system.
One thing I tried was to create another account and login wit it, the “bash: n: command not found…” also manifests it self with the newly crated account so, I assume it is something system wide.
Thank you for pointing me to /etc/profile.
The problem was in fact in that particular file. I checked another machine running Fedora 37 and not affected by the problem and the two differ:
The one with the problem looks like this:
# Source global bash config, when interactive but not posix or sh mode
if test "$BASH" &&\n test -z "$POSIXLY_CORRECT" &&\n test "${0#-}" != sh &&\n test -r /etc/bashrc
then
# Bash login shells run only /etc/profile
# Bash non-login shells run only /etc/bashrc
# Check for double sourcing is done in /etc/bashrc.
. /etc/bashrc
fi
the other one looks like this:
# Source global bash config, when interactive but not posix or sh mode
if test "$BASH" &&\
test -z "$POSIXLY_CORRECT" &&\
test "${0#-}" != sh &&\
test -r /etc/bashrc
then
# Bash login shells run only /etc/profile
# Bash non-login shells run only /etc/bashrc
# Check for double sourcing is done in /etc/bashrc.
. /etc/bashrc
fi
I assume the &&\n is the culprit.
Why they are different, I have no idea, I never edited them.
Can you please run rpm -Vf /etc/profile? This will verify the checksums of the files in the package that contains /etc/profile. You’ll probably see a line about fstab, which you can ignore. But if there’s one for /etc/profile that looks something like this: