Why missing session after running tmux with -d parameter and instructions? [closed] - bash

Closed. This question is not about programming or software development. 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 yesterday.
Improve this question
After entering tmux new-session -d -s test1, session appears after entering tmux ls
After entering tmux new-session -d -s test1 'touch test.txt', session doesn't appear after entering tmux ls (test.txt get created)
Please help me :(
I expected the session to appear after entering tmux ls in the second case.

Related

Viewing the contents of a deleted shell script that is still running [closed]

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
Another post offered a solution for a self deleting shell script rm -- "$0"
If this line is inserted at the top of the script then the script will delete itself as soon as it starts running.
Is it possible to get the contents of the deleted script while it continues to run (meaning a process is still showing up via ps -eaf | grep scriptname)?
This way you can restore the script to its original position. $pid contains the PID of your script, e.g. 12345.
pid=12345
cat /proc/$pid/fd/255 > "$(readlink /proc/$pid/fd/255 | sed 's/ (deleted)$//')"

How to start a bash session from fish [closed]

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 Ubuntu, I have fish installed, and have it set as my default shell using chsh -s /usr/bin/fish.
I would like to open a bash shell. Entering bash creates a new fish session. How can I open bash without ending my login session?
If you're typing bash and ending up in a fish shell it almost certainly means you have put exec fish in your ~/.bashrc script. Which is a commonly used technique to make fish your "default" shell without the risk that chsh -s /usr/bin/fish entails. Just remove that line from your .bashrc now that you no longer need it.

Unix user without password still needs password [closed]

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 created a user on OS X Mavericks – dscl . -create /Users/newuser UserShell /bin/sh – without setting any password. This is confirmed by reading the user file with the dscl interactive prompt.
However, when I sudo su newuser and try to su back to root, bash prompts me for a password. I need to close the terminal and open a new window to exit the user session.
Why is that?
When you run sudo su newuser, you are effectively running as "newuser". Running su as "newuser" will require escalating to root, requiring a password.
Try just exiting the the original su session with exit or <ctrl-d>. This should return you to the original shell.

Use over ssh automatically a different shell than the users default [closed]

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 9 years ago.
Improve this question
We use as the default shell: Bash on our servers but some of us like zsh more, so we searching for a way, to set ZSH automatically.
chsh to zsh i not an option.
How about
ssh -t remote_user#remote_host zsh
?
Depends on how 'automatically' do you want it.
If you want that just ssh -t remote_user#remote_host should give you zsh prompt, then you should think on the lines of bash functions probably. but IMO, that would be a really bad way to do it.

Bash commands not found — $PATH damaged [closed]

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 9 years ago.
Improve this question
I accidentally made a mistake when I changed my ~/.bash_profile file and now I'm unable to run any command, such as ls, touch, sudo, etc.
When I write echo $PATH I have this result:
$ echo $PATH
/usr/local/bin:
$
And when I type /bin/cat ~/.bash_profile, I have this result:
export PATH=$HOME/local/node/bin:/usr/local/bin:$PATH
export PATH=/usr/local/bin:$PATHh
But I am unable to change it. Can someone help me, please?
If you can do /bin/cat, you should be able to /usr/bin/vi, too. Alternately, just fix it in your local shell:
PATH=/bin:/usr/bin:/sbin:/usr/sbin
And then running your favourite editor should work again.

Resources