How to toggle the symbol # (cerquilha) by the $ (dollar sign) in the terminal after exchanging user

0

I'll be straightforward, because the Title denotes part of my curiosity about the linux console.

I explain

In some distros type xPud and Basiclinux3 is not supported "HOME" is just "ROOT" and done!

In the distro that I'm using, the "#" heading in the console does not change to "$" after logging in.

Doubt

I do not know how this works and / or simply how it should be done. Does anyone know!?

    
asked by anonymous 18.12.2016 / 06:45

2 answers

0
  

[...] how does this work ... how should this be done [...]



I solved it this way:

I downloaded the passwd.tgz package from slackware-0.4

This is the second of the three programs (init, getty and login) used by the system to allow users to access.

Until then, the distro in use, had been built minimalist based on this package only init

Once this has been done, I had to create two new files in the /etc directory, they are:

group
passwd


For the " group " file I wrote:

root::0:root,lx


As for " passwd ", I did:

root::0:0::/root:/bin/sh lx::1001:1001::/home/lx:/bin/sh


  

This profitable work was needed because not all the distros available on the web come complete, they present themselves in a way about a single user root. / p>

    
18.12.2016 / 18:44
1

The file /etc/profile usually has a variable called PS1 (you can find it by typing echo $PS1 ), it has the function to create a mask for the Bash entry, making the change of its value, changes the writing in its terminal.

export PS1='\u@\h \w $ '
# \u mostra o nome do usuário
# \h mostra o host do usuário (nome da maquina)
# \w ou \W mostra o path, para W pasta atual e w caminho absoluto
# para colorir a saída, basta usar '\[3[01;34m\]' para colorir com verde e negrito.

To apply to all users, simply reset the variable to /etc/profile

export PS1='\[3]0;\u@\h:\w
export PS1='\u@\h \w $ '
# \u mostra o nome do usuário
# \h mostra o host do usuário (nome da maquina)
# \w ou \W mostra o path, para W pasta atual e w caminho absoluto
# para colorir a saída, basta usar '\[3[01;34m\]' para colorir com verde e negrito.
7\]'
    
19.12.2016 / 02:32