How do I teach my linux command line manners?

35

10

Whenever I complete something in the command line while using Ubuntu and my computer does something of value to me, I enjoy saying thank you, just because it's the polite thing to do. A typical conversation might look something like this:

mtp-sendfile HamishAndyPodcast.mp3 /Music/podcasts
Sending file...
Progress: 17769768 of 17769768 (100%)
New file ID: 76098
sam@sams-laptop:~$ thanks
thanks: command not found

What's the best way to teach my PC a few manners and respond with something like "No problemo".

Sam152

Posted 2010-06-02T13:03:43.857

Reputation: 2 052

Answers

30

Add this to ~/.bash_aliases or execute it on the commandline:

alias thanks='echo "No problemo dude!"'

Eg:

user@host:~$ alias thanks='echo "No problemo dude!"'
user@host:~$ thanks
No problemo dude!

You could also stick it in your ~/.bashrc. If you add it to ~/.bash_aliases, make sure your ~/.bashrc has a section like this:

# Alias definitions.
if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

quack quixote

Posted 2010-06-02T13:03:43.857

Reputation: 37 382

\\ infront of an alias will ignore the alias. – Rob – 2012-03-30T18:02:46.143

Can we do the same in windows? – Santosh Kumar – 2012-04-01T17:20:37.380

5

alias thanks='fortune zippy'

or

alias thanks='fortune fortunes'

coderanger

Posted 2010-06-02T13:03:43.857

Reputation: 101