Reply
Thread Tools
Posts: 107 | Thanked: 4 times | Joined on Apr 2007
#1
hi, can create my own aliases in a txt document, source it, and be able to use it?

for example

logmein = 'ssh me@mysite.com'

so i can type logmein and it will execute my command?
 
Posts: 5 | Thanked: 2 times | Joined on Jan 2009 @ NH, USA
#2
For anyone that stumbles across this like I did:

Become root
Edit /etc/profile (this will affect all users)
Add the line
Code:
alias logmein="ssh me@mysite.com"
There's probably a way to do this without being root (equivalent to .bashrc), but this was easy enough and got the job done.
 

The Following User Says Thank You to botsnlinux For This Useful Post:
Posts: 2,802 | Thanked: 4,491 times | Joined on Nov 2007
#3
Originally Posted by botsnlinux View Post
Become root
Edit /etc/profile (this will affect all users)
[...]
There's probably a way to do this without being root
Yes, use /home/user/.profile instead.
 

The Following User Says Thank You to lma For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 16:52.