Default attributes [closed] - bash

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
Good morning folks,
I'd like to edit default attributes of some shell commands.
e.g. if I enter "ls", the shell should then interprete "ls -lth".
Could anyone please help me?
Thanks !
Sonsoles

An alias is the solution:
alias ls='ls -lth'
You have to store it in your ~/.bashrc to make it work every time you log in.
In case you some day want to use the default ls, you can invoke the default behaviour typing \ls.

Related

Bash commands not found in Git bash shell [duplicate]

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 did something wrong with PATH, so currently if I type ls command I get:
bash: ls: command not found
How can I solve it?
Restore $PATH. The easiest way to do this is to close the current shell and open a new one (assuming you didn't futz with the shell startup files and this is why it's broken).

How To Only Show a $ In a Mac Terminal? [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 5 years ago.
Improve this question
I only want a $ to show up in my terminal (mac) instead of: Macintosh:~ username$
I tried to change it in the settings but that didn't work...
Does anyone know how to do this?
Thanks in advance!
edit ~/.bash_profile
add the following line: export PS1="$ "
This can be done by editing ~/.bash_profile
There are lots of tutorials online.

What´s wrong with my Terminal? [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 6 years ago.
Improve this question
I dont know whats wrong with my Terminal that i see like this:
see that it appears -bash-3.2$, instead of:
Apologize my english, im from Argentina
You will need to override the PS1 variable to change the prompt.
Set your PS1 to "Macbook:~ \u$" like this-
PS1="Macbook:~ \u$"
If you want your host name to be printed instead of "Macbook" use \H.
This link will give you more info.

How do I add a command to .profile? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
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.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I would like the command
PROMPT_COMMAND=echo
to be executed every time I open bash. I've been told that this command can be read from ~/.profile, however, I do not know how to put it there.
echo 'PROMPT_COMMAND=echo' >> ~/.profile
If you are on mac, you have to add it to
~/.bash_profile
If on linux, it'll go in
~/.bashrc

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.

Resources