Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I logged into my account on Bluehost using SSH and I got an unusual prompt.
I expected it to show the directory and a typical prompt but instead got some bash.
What you're seeing is the default bash prompt. This is what you get when the distro doesn't provide a better one in /etc/profile or similar. You can get it on any platform by ignoring the environment and config files:
env -i bash --norc
To get the user#host:dir$ prompt that Debian and derived distros use, you can add
export PS1='\u#\h:\w\$ '
to your .bash_profile
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
On my machine i'm getting "root#umar" that I want to change to "root#junaid". I have tried running different commands. They do change my username but above mentioned name is not changing.
See in above image. User I'm logged in as is "Junaid". But before that there is "root#umar" that I want to be changed to "root#junaid". Solutions I have tried change my current username that I'm loggedIn as.
Any solution?
"umar" is the hostname. So you should change it to get prompt like "root#junaid"
To do this on the fly you should exec next command:
sudo hostname junaid
sudo vi /etc/hostname
(to update the hostname there)
and the same in hosts file
sudo vi /etc/hosts
If you run commands as root you do not need to have sudo
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
When I SSH into the server, I'm not being fully logged in. What I mean by this, is that if I use whoami, it displays my account. However, my .bashrc never gets initiated. My terminal also looks like:
-sh: 25: [[: not found
$
Once I su into the account, everything works fine, and my terminal shows:
user#ip-000-00-00-000:~$
What's causing this?
This happens because your login shell is sh, a simpler shell with fewer features. You can change it to bash with chsh.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
How to run shell script when XServer is started and lightdm also. I tried with init.d and rc.local in /etc directory, but my script is calling an gui application so that the reason I need to run it after XServer is started.
I am using Debian Jessie.
According to this link .xinitrc in your home directory will be read and executed, otherwise the default /etc/X11/xinit/xinitrc is used. So you should be able to create this file and have the shell script started.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
When I try to change user to root, I get below error
➜ ~ su
Password:
Cannot execute /usr/local/bin/fish: No such file or directory
Any idea how do I get rid of this? I do not have fish installed now. I had installed it earlier.
I did the following and it worked for me.
Did "sudo bash" and got logged in as root. Was not able to login as root using normal "su" as it was throwing the error related to fish.
Deleted all traces of fish and zsh
logged out and logged in with my normal user name. Now , the default shell bash is working fine.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I did something stupid which was adding the command exit 0 to .bash_login.
Now i'm stuck since whenever i try logging in, it just exits automatically.
Any ideas on how to resolve this? I'm currently using a windows PC to ssh to a linux plug computer.
ssh user#host "/bin/bash --noprofile"
See manpages for ssh and bash to see how this works. May need some modifications-- for example, if bash isn't in /bin on the remote machine. You will need a command-line ssh client, but I believe one is available for Cygwin on Windows.
After that, you should have a usable shell so you can fix your .bash_login.
Can you start a different shell?
ssh user#host tcsh
Then, in the different shell, fix or rename the file.