• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Gelöst: "bashrc not found" auf der Konsole

Hi, kleine Frage,

wenn ich mich auf einer Textkonsole einlogge, meckert die bash, dass sie die .bashrc nicht findet, obwohl selbige sich durchaus in meinem Homeverzeichnis befindet. Wie bringe ich der bash wieder bei, dass sie da ist?

-bash: .~/.bashrc: Datei oder Verzeichnis nicht gefunden

find . -name .bashrc
./.bashrc
 
b3ll3roph0n schrieb:
Poste doch mal deine ~/.bashrc

cat .bashrc
# Sample .bashrc for SuSE Linux
# Copyright (c) SuSE GmbH Nuernberg

# There are 3 different types of shells in bash: the login shell, normal shell
# and interactive shell. Login shells read ~/.profile and interactive shells
# read ~/.bashrc; in our setup, /etc/profile sources ~/.bashrc - thus all
# settings made here will also take effect in a login shell.
#
# NOTE: It is recommended to make language settings in ~/.profile rather than
# here, since multilingual X sessions would not work properly if LANG is over-
# ridden in every subshell.

# This might be helpful for Linux newbies who previously used DOS...
test -f /etc/profile.dos && . /etc/profile.dos

# Some applications read the EDITOR variable to determine your favourite text
# editor. So uncomment the line below and enter the editor of your choice :)
export EDITOR=/usr/bin/vim
#export EDITOR=/usr/bin/mcedit

# For some news readers it makes sense to specify the NEWSSERVER variable here
#export NEWSSERVER=your.news.server

# If you want to use a Palm device with Linux, uncomment the two lines below.
# For some (older) Palm Pilots, you might need to set a lower baud rate
# e.g. 57600 or 38400; lowest is 9600 (very slow!)
#
#export PILOTPORT=/dev/pilot
#export PILOTRATE=115200

test -s ~/.alias && . ~/.alias || true

alias ls="ls -C -F --color"
 
A

Anonymous

Gast
anduna schrieb:
-bash: .~/.bashrc: Datei oder Verzeichnis nicht gefunden

Die Fehlermeldung sieht aus, als ob in der /etc/profile eine kleiner Fehler drin ist. Und zwar in folgendem Abschnitt.
Code:
if test "$is" = "bash" -a -z "$_HOMEBASHRC" ; then
    # loop detection
    readonly _HOMEBASHRC=true
    test -r $HOME/.bashrc  && . $HOME/.bashrc
fi
und zwar genau an dieser Stelle
test -r $HOME/.bashrc && . $HOME/.bashrc das Leerzeichen verschwunden ist.

robi
 
robi schrieb:
test -r $HOME/.bashrc && .HOME/.bashrc das Leerzeichen verschwunden ist.

Hallo Robi, hier die Stelle aus meiner /etc/profile:
Code:
if test "$is" = "bash" -a -z "$_HOMEBASHRC" ; then
    # loop detection
    readonly _HOMEBASHRC=true
    test -r $HOME/.bashrc  && . $HOME/.bashrc
fi

sieht für mich genau gleich aus. Enttäuschte Grüße, anduna
 
Als erstes solltest Du dir angewöhnen solche Sachen per
Code:
[code]
[/code] zu posten und als nächstes irritiert mich deine erste Fehlermeldung:
-bash: .~/.bashrc: Datei oder Verzeichnis nicht gefunden
und zwar der Punkt vor der Tilde (~). Bist Du sicher das Du richtig zitiert hast?
 
Tschuljung, habe die Frage glatt vergessen, da ich mich nicht ständig auf der Konsole anmelde!

Geier0815 schrieb:
Als erstes solltest Du dir angewöhnen solche Sachen per
Code:
[code]
[/code] zu posten

alles klar, versuche, mir das zu merken.

Geier0815 schrieb:
und zwar der Punkt vor der Tilde (~). Bist Du sicher das Du richtig zitiert hast?

.~/.bashrc Datei oder Verzeichnis nicht gefunden
lautet die Meldung, nur wenn ich mich auf einer Konsole anmelde.
 
Existiert in deinem Homeverzeichnis eine .bash_profile oder .profile?

Ansonsten mal ein
Code:
grep -ilr .~/.bashrc ~
ausführen.
(Sollte alle Dateien unterhalb deines Homeverzeichnisses nach .~/.bashrc durchsuchen)
 
b3ll3roph0n schrieb:
Existiert in deinem Homeverzeichnis eine .bash_profile oder .profile?

Ich habe eine .profile, aber keine .bash_profile.

b3ll3roph0n schrieb:
Ansonsten mal ein
Code:
grep -ilr .~/.bashrc ~
ausführen

Hab´s wegen der Fehlermeldungen so versucht:

Code:
grep -ilr .~/.bashrc ~ 2> /dev/null

aber er braucht ne halbe Stunde, um
Code:
home/xx/.viminfo
rauszuwerfen.

Problem ist noch ungelöst. leider
 
jengelh schrieb:
grep -ilr '\.bashrc' /etc

Code:
grep -ilr '\.bashrc' /etc
/etc/bash.bashrc
/etc/ksh.kshrc
/etc/skel/.bashrc
/etc/skel/.profile
grep: /etc/alternatives/jre_gcj/lib/jdtcore.jar: No such file or directory
/etc/apparmor/severity.db
/etc/apparmor.d/abstractions/bash
/etc/profile
/etc/preload.d/kdm.auto
/etc/preload.d/kde
/etc/csh.login

Code:
grep -ilr .~/.bashrc /etc 2> /dev/null


Code:
grep -ilr .~/.bashrc /etc 2> /dev/null
/etc/skel/.bashrc

Und was steht in der .profile?

Code:
# Sample .profile for SuSE Linux
# rewritten by Christian Steinruecken <cstein@suse.de>
#
# This file is read each time a login shell is started.
# All other interactive shells will only read .bashrc; this is particularly
# important for language settings, see below.

test -z "$PROFILEREAD" && . /etc/profile

# Most applications support several languages for their output.
# To make use of this feature, simply uncomment one of the lines below or
# add your own one (see /usr/share/locale/locale.alias for more codes)
#
#export LANG=de_DE@euro     # uncomment this line for German output
#export LANG=fr_FR@euro     # uncomment this line for French output
#export LANG=es_ES@euro     # uncomment this line for Spanish output

if      test -f ~/.bashrc; then
        .~/.bashrc
fi

Danke
 
Code:
if      test -f ~/.bashrc; then 
         .~/.bashrc
fi
Dann hätten wir es doch. :wink:

Code:
.~/.bashrc
in
Code:
. ~/.bashrc
ändern.
Nach dem ersten Punkt muss ein Leerzeichen folgen.

Alternative:
Die Zeile durch
Code:
source ~/.bashrc
ersetzen.
 
Aha!!

Jetzt hat es geklappt, Anmeldung an der Konsole OHNE Fehlermeldung!!

Danke, besonders an die Geduld von b3ll3roph0n! (Stelle ja fest, das Problem war im Prinzip so, wie du es gleich im Anfang geschrieben hast, nur bezogen auf eine andere Datei.)

Schönen Sonntag!
 
Oben