[Linux-bruxelles] ????? hostname = -f ?????

Renaud Dans renodan at bigfoot.com
Jeu 24 Mai 14:26:05 CEST 2001


On Thu, 24 May 2001, blenderman <blenderman at wanadoo.be> wrote:
> 
> 
> 
> On Thu, 24 May 2001, Renaud Dans wrote:
> 
> > On Thu, 24 May 2001, blenderman <blenderman at wanadoo.be> wrote:
> > >
> > >
> > >
> > > On Thu, 24 May 2001, Renaud Dans wrote:
> > >
> > > > On Wed, 23 May 2001, blenderman <blenderman at wanadoo.be> wrote:
> > > > >
> > > > > Yop tlm !
> > > > >
> > > > >
> > > > > J'ai un petit probleme avec mon PC,
> > > > >
> > > > > Voila le probleme illustré:
> > > > >
> > > > > 1) Je loggue ma machine en 'root'
> > > > > 2) Je lance X
> > > > > 3) Je quitte X
> > > > > 4) Je me 'deloggue'
> > > > > 5) Je me loggue en utilisateur...
> > > > >
> > > > > 6) Voila ce qu'est mon hostname: [22:42:01][blenderman at -f:~]$
> > > > >
> > > > > Comment ca ce fait ???
> > > >
> > > > cd ; cat .bashrc | grep PS1
> > > >
> > > > R.
> > > >
> > >
> > > mmmh...ca change rien....
> > >
> > > Voila la sortie:
> > >
> > > [09:14:03][root at -f:~]# cd ; cat .bashrc | grep PS1
> > > PS1="[\t][\u@\h:\w]\\$ "
> > > [09:14:10][root at -f:~]#
> >
> > \t=time (date)
> > \u=user (whoami)
> > \h=hostname (hostname)
> > \w=working directory (pwd)
> >
> > see:
> > http://www.shelluser.net/~giles/bashprompt/prompts/index.html
> > zless /usr/doc/HOWTO/en-txt/Bash-Prompt-HOWTO.txt.gz
> > man bash
> >
> >
> > Hum qu'il est bon d'avoir un prompt qui nous ressemble :)
> >
> > R.
> >
> >
> > _______________________________________________
> > Linux-bruxelles mailing list
> > Linux-bruxelles at lists.bxlug.org
> > http://www.bxlug.org/mailman/listinfo/linux-bruxelles
> >
> >
> 
> 
> Merci pour les pages, c'est génial ce que on peut faire avec 1 shell !
> 
> Le probleme est plus profond, pourquoi me met il mon hostname a '-f' quand
> je lance X avec root ???

Parce que ta machine s'appelle "-f" probablement.
user~>hostname
te donnera le nom de ta machine qui se trouve dans le fichier /etc/hostname
et /etc/hosts

root~>hostname SET NAME le_nouveau_nom_de_ma_machine
mais cela je n'ai pas testé...
man hostname

R.





Plus d'informations sur la liste de diffusion Linux-bruxelles