Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Alias Command, less typing!!
ctrunk514
post Jul 25 2003, 08:45 AM
Post #1


./configure
***

Group: Members
Posts: 93
Joined: 29-May 03
From: Denver, CO, USA
Member No.: 902



How can I make Alias command:

like if I want to make it so that when a user types "edit" at the command prompt and PICO starts

or

Type some "someword" and it really executes "some Linux command"

I know this is possible, I just can not remember how to do it


Red Hat 9
Go to the top of the page
 
+Quote Post
Joey
post Jul 25 2003, 08:53 AM
Post #2


LinuxHelp Admin
*******

Group: Admin
Posts: 1,096
Joined: 18-September 02
Member No.: 1



There is a few ways to do this.

For the edit command you can use a symlink to pico.

For example:

ln -s /usr/bin/pico /usr/bin/edit

You can also create aliases in your shell's .rc file.

For example, i use TCSH and in my /home/username/.tcshrc I have the following:

alias sd 'lynx http://www.slashdot.org'

So if I type sd it opens up lynx and goes to slashdot.org.

If you run bash there should probably be a .bashrc file in your home dir. The formatting for this file is slightly different. An example for bash would be:

alias sd='lynx http://www.slashdot.org'
Go to the top of the page
 
+Quote Post
ctrunk514
post Jul 25 2003, 08:53 AM
Post #3


./configure
***

Group: Members
Posts: 93
Joined: 29-May 03
From: Denver, CO, USA
Member No.: 902



Awsome!!

Thats exactly what I wanted!

you da man
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th October 2017 - 06:25 PM