Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wie mache ich diesen Shell Prompt?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
ConiKost
Developer
Developer


Joined: 11 Jan 2005
Posts: 1371

PostPosted: Mon Dec 19, 2005 9:35 am    Post subject: Wie mache ich diesen Shell Prompt? Reply with quote

Hallo!
Bei uns im Serverraum steht seit langer Zeit nen Gentoo Server.
Dort ist, wenn ich mich als Benutzer anmelde folgender Prompt:

Code:

1033 mardok/root>/home/conikost #


Wie kann auch sowas zu hause machen? Also es wird immer der ganze Pfad angezeigt.
Back to top
View user's profile Send private message
chilla
Apprentice
Apprentice


Joined: 12 Dec 2004
Posts: 203
Location: Heidelberg, Germy

PostPosted: Mon Dec 19, 2005 9:45 am    Post subject: Reply with quote

Schau mal hier rein, da stehts irgendwo:

http://www.faqs.org/docs/Linux-HOWTO/Bash-Prompt-HOWTO.html



Meiner sieht beispielsweise so aus:
Code:
PS1="\[\033[0;36m\][\t]\[\033[1;34m\]|\[\033[0;32m\][\u\[\033[1;34m\]@\[\033[0;32m\]\h]\[\033[1;34m\]|\[\033[1;33m\]\w\[\033[0m\]\[\033[1;34m\]$\[\033[0m\] "

_________________
"Democracy is two wolves and a sheep voting on what to have for dinner. Liberty is two wolves attempting to have a sheep for dinner and finding a well-informed, well-armed sheep."

TU-BS Wiki
Back to top
View user's profile Send private message
mondauge
l33t
l33t


Joined: 08 Jan 2003
Posts: 603
Location: Schwetzingen, Germany

PostPosted: Mon Dec 19, 2005 9:45 am    Post subject: Reply with quote

Probier mal folgendes:

Log dich auf dem Server ein und führ folgenden Befehl aus:
Code:
echo $PS1

Das sollte einen String ausgeben, der ungefähr so aussieht:
Code:
mondauge@athena [~] -> echo $PS1
\[\033[01;35m\]\u@\h \[\033[01;34m\][\w] -> \[\033[0m\]

Diesen String musst du folgendermaßen auf deinem Heimsystem in die Datei ~/.bashrc eintragen:
Code:
PS1=\[\033[01;35m\]\u@\h \[\033[01;34m\][\w] -> \[\033[0m\]

Dann die Datei abspeichern. Über den Befehl
Code:
. ~/.bashrc

sollte dein Prompt so aussehen wie auf dem Server.

HTH,
andi
Back to top
View user's profile Send private message
bll0
Apprentice
Apprentice


Joined: 22 May 2004
Posts: 178

PostPosted: Mon Dec 19, 2005 9:46 am    Post subject: Reply with quote

Schau mal hier:

http://de.gentoo-wiki.com/Prompt_Magic
http://www-128.ibm.com/developerworks/linux/library/l-tip-prompt/
http://www.gilesorr.com/bashprompt/
_________________
I need a girl whose name doesn't end in .jpg
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum