bashrc
-
- Posts: 23
- Joined: 2006-12-22 16:10
bashrc
hi leutz
ich habe in meiner bashrc so konfiguriert das wenn ich mich einlogge auf den server und . .bashrc eintippe dann alles farbig ist, so zu meinem prob.
Also wenn ich mich einlogge dann bin ich automatisch in root@blabla:/ da ist dann nix farbig ich muß immer . .bashrc eintippen das das farbige hervor kommt. So wenn ich aber in der etc/passwd das so abändern das ich mich auf root@blabla:~ einlogge dann ist es automatisch farbig, irgendwo muß doch der hund begraben sein das ich das farbige auch habe wenn ich mich auf root@blabla:/ einlogge. Weiß jemand rat ?
ich habe in meiner bashrc so konfiguriert das wenn ich mich einlogge auf den server und . .bashrc eintippe dann alles farbig ist, so zu meinem prob.
Also wenn ich mich einlogge dann bin ich automatisch in root@blabla:/ da ist dann nix farbig ich muß immer . .bashrc eintippen das das farbige hervor kommt. So wenn ich aber in der etc/passwd das so abändern das ich mich auf root@blabla:~ einlogge dann ist es automatisch farbig, irgendwo muß doch der hund begraben sein das ich das farbige auch habe wenn ich mich auf root@blabla:/ einlogge. Weiß jemand rat ?
-
- Posts: 23
- Joined: 2006-12-22 16:10
Re: bashrc
aha werde ich mal probiern, bei mir wird die die bin/bash geladen
-
- Project Manager
- Posts: 11182
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: bashrc
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
-
- Posts: 23
- Joined: 2006-12-22 16:10
Re: bashrc
matzewe01 wrote:Ja,
/etc/profile
trage dort einfach mal ". ./${PFADZUDEINEM.bashrc}"
ein allerdings auch so, dass es dort ausgeführt wird.
Allg. Grundlagen zur Shell wären kein Fehler. und sind wohl die Basis jedes Administrators.
Ergänzung:
die /etc/passwd gibt Aufschluss darüber, welche Shell geladen wird.
das habe ich gemacht doch es kommt folgende fehlermeldung
-bash: ./${.bashrc}: bad substitution
sicher ist es die bin/bash wäre auch schwach sinn wenn es was anderes wäre würde ja net funzen
-
- Posts: 483
- Joined: 2006-01-06 03:23
- Location: Neben Bonn
Re: bashrc
OT:
<_blackcat> in the bash how do I get it so that it will show the all the dirs in a different color?
<octalpuss> i believe that's the --gay option
-
- Posts: 695
- Joined: 2005-09-16 00:06
- Location: Berlin-Reinickendorf
Re: bashrc
:DEdRoxter wrote:OT:
<_blackcat> in the bash how do I get it so that it will show the all the dirs in a different color?
<octalpuss> i believe that's the --gay option
-
- Posts: 23
- Joined: 2006-12-22 16:10
Re: bashrc
matzewe01 wrote:Ahhhhh
Ist denn die Variable ${.bashrc} gesetzt ?
Setzen 6!
Wenn dann sieht der Aufruf nach wie vor so aus:
. ./.bashrc
Stelle aber sicher, dass Du Dich auch dort befindest.
Ansonsten ist der sicherste weg immer noch:
Hole dir ein Buch und lerne die Grundlagen.
Und die Shell bin/bash ist falsch, sollte das wirklich so in Deiner /etc/passwd drinn stehen, dann ist das falsch.
Benutzer falsch angelegt. Entweder /bin/bash oder gar nicht.
ich habe doch das in /etc/profile eingetragen und da kam dann die fehlermeldung, sicher habe ich diese shell gemeint mit /bin/bash sonst keine
-
- Posts: 5923
- Joined: 2004-05-23 12:53
Re: bashrc
Lies nochmal die von Joe User in http://www.rootforum.org/forum/viewtopi ... 73#p300573 verlinkte Seite...
-
- Posts: 23
- Joined: 2006-12-22 16:10
Re: bashrc
so ich denke es wird daran liegen das ich ja mein ssh zugang abgesichert habe und somit mich als normaler benutzer einlogge sobald ich eingeloggt bin und su tippe dann ist es farbig also so wie ich die .bashrc konfiguriert habe. wo besteht die möglichkeit das das schon so ist wenn ich mich als benutzer einlogge ? muß ich da was in der sshd config ändern ?
-
- Posts: 669
- Joined: 2002-12-20 19:47
- Location: Mönchengladbach
Re: bashrc
Wenn du dich als normaler Nutzer anmeldest hast du eine andere ~/.bashrc als wenn du anschließend ein su - machst, nach letzterem Befehl bekommst du die /root/.bashrc ...
-
- Administrator
- Posts: 2641
- Joined: 2004-01-21 17:44
Re: bashrc
Bourne Shell Derivate lesen die Datei ~/.profile ein. Auf Systemen, auf denen Bash die Default-Shell ist, reicht meistens eine minimalistische ~/.profile, die die .bashrc sourct. Dieses Vorgehen ist der Standard und kommt bei allen Debian-Derivaten, ArchLinux und einigen anderen Distributionen sowie allen BSD-Derivaten zum Einsatz.
Manche Distributionen (Gentoo, SuSE) verwenden anstelle der lokalen ~/.profile eine globale /etc/profile. Was man lieber mag, ist Geschmackssache, man muss nur darauf achten, dass der Shell die richtigen Default-Konfigurationsdateien einkompiliert wurden => daher sollte man sich an den Style der jeweiligen Distribution halten.
Code: Select all
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
-
- Posts: 23
- Joined: 2006-12-22 16:10
Re: bashrc
also die .bashrc ohne su ist identisch mit der nach dem su, stehe das gleiche drinn. wie bekomme ich es hin ohen das su zu tippen ?SunTzu wrote:Wenn du dich als normaler Nutzer anmeldest hast du eine andere ~/.bashrc als wenn du anschließend ein su - machst, nach letzterem Befehl bekommst du die /root/.bashrc ...
-
- Posts: 23
- Joined: 2006-12-22 16:10
Re: bashrc
also in der /etc/profile habe das
meine .bashrc habe ich einmal unter / wo die ganzen anderen ordner stehen wie etc var etc. und unter /root/.bashrc
p.s. nen führerschein habe ich zur zeit net hehe
Code: Select all
if [ "`id -u`" -eq 0 ]; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11"
else
PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
fi
if [ "$PS1" ]; then
if [ "$BASH" ]; then
PS1='u@h:w$ '
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
export PATH
umask 022
export LS_OPTIONS='--color=auto -F'
alias dir=ls
p.s. nen führerschein habe ich zur zeit net hehe
-
- Project Manager
- Posts: 11182
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: bashrc
http://www.gnu.org/software/bash/manual ... rtup-Files und die Dokumentation der diversen Distributionen sollten völlig ausreichen. Lesen und verstehen muss allerdings jeder diese Grundlagen selbst...
BTW: Ohne Farbdefinitionen wird der OP sein Ziel nicht erreichen...
BTW: Ohne Farbdefinitionen wird der OP sein Ziel nicht erreichen...
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
-
- Posts: 23
- Joined: 2006-12-22 16:10
Re: bashrc
@matze
ok jetzt funzt es naja trotzdem thx auch wenn es ein wenig umständlich war hehe.
@joe
gibts sowas auch auf german ?
ok jetzt funzt es naja trotzdem thx auch wenn es ein wenig umständlich war hehe.
@joe
gibts sowas auch auf german ?
-
- Project Manager
- Posts: 11182
- Joined: 2003-02-27 01:00
- Location: Hamburg
Re: bashrc
Wozu? Offizielle Dokumentationen sind bei allen OS in Englisch verfasst und ohne ausreichende Englischkenntnisse sollte man grundsätzlich die Finger von Modifikationen des Systems und erst recht von Servern lassen...
PayPal.Me/JoeUser ● FreeBSD Remote Installation
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
Wings for Life ● Wings for Life World Run
„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.
-
- Posts: 23
- Joined: 2006-12-22 16:10
Re: bashrc
ist schon ok hier stoß man nur auf nen holzweg anstatt vernünftiger weiße geholfen wird naja auch wayne