[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Perche' bash-2.05a$



On Fri, Jul 09, 2004 at 02:16:40AM +0200, Hugh Hartmann wrote:
> Hello Gandu,
> 
> On Fri, Jul 09, 2004 at 01:44:38AM +0200, Gandu wrote:
> > Ciao, e' la terza volta che mi capita. Loggandomi come root al posto del
> > solito e incoraggiante root@gandu# visualizzo bash-2.05a$
> Per ottenere il "solito" e "incoraggiante" prompt dovresti avere nella
> directory di root il file .profile e .bashrc simili ai seguenti:
> 
> --------------------------------------------------------------------------
> # ~/.profile: executed by bash(1) for login shells.
> 
> if [ -f ~/.bashrc ]; then
>   source ~/.bashrc
> fi
> 
> PATH=/usr/local/sbin:/usr/local/bin:usr/local/scitext/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
> export PATH
> 
> mesg n
> --------------------------------------------------------------------------
> 
> # ~/.bashrc: executed by bash(1) for non-login shells.
> 
> export PS1='\u@\h:\w\$ ' <---- questa e' la riga che stabilisce il prompt
> umask 022
> 
> # You may uncomment the following lines if you want `ls' to be colorized:
> export LS_OPTIONS='--color=auto'
> eval `dircolors`
> alias ls='ls $LS_OPTIONS'
> alias ll='ls $LS_OPTIONS -l'
> alias l='ls $LS_OPTIONS -lA'
> #
> # Some more alias to avoid making mistakes:
> alias rm='rm -i'
> alias cp='cp -i'
> alias mv='mv -i'
> 
> export LANG=C
> ------------------------------------------------------------------------
> La riga necessaria per il tipo di prompt che si desidera si trova in 
> .bashrc ed e':
> ...
> export PS1='\u@\h:\w\$ ' 
> ...
> dove u sta per nome utente (root in questo caso),
> h sta per hostname (nome della macchina)
> w sta per work direttory (direttory di lavoro)
> 
> Ecco, forse il motivo e' che non hai impostato il prompt in bashrc, infatti
> se non si imposta questo file (o addiritura non esiste, il sistema usa il
> file /etc/profile che ha proprio un prompt molto scarno, praticamente solo
> il $ .... (esempio di /etc/profile)
> ------------------------------------------------------------------------
> 
> # /etc/profile: system-wide .profile file for bash(1).
> 
> PATH="/usr/local/bin:usr/local/scitetx/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
> PS1="\\$ " <----- ecco la riga incriminata!!! .... :-)
> EDITOR=/usr/bin/joe
> LANG=it_IT
> LESS=is
> PAGER=/usr/bin/less
> export PATH PS1 EDITOR LANG LESS PAGER
> ....
> ------------------------------------------------------------------------
> 
> Spero di essere stato esaustivo ....
> Ma in ogni caso e' sempre consigliabile: man bash
 
> Au Revoire
> Hugh Hartmann



Reply to: