All posts tagged bash

After trying to do login, i got the error about some permission denied running bash.

Making a long story short, this error comes due to some file permission problems. You can read the hole story in

Now the solution:

# strace -s 10000 -vfo login.username login username

where username is the user login that fails.


Special characters to show useful information in $PS1 prompt:

\h short hostname (without domain).
\H long hostname.
\n new line.
\s shell name (like bash, sh)
\t 24h format clock.
\u current username.
\v shell version.
\w current folder.

Inside PS1 we can add the output of a specific command, preferably with short output, like  PS1=$(date)

We can color the prompt messages just adding  \[\033[COLORm\]. and \[\033[0m\] to stop colors to avoid colored commands.

Where COLOR