Adi Helio
Adi Helio

Reputation: 25

Make a one word command for my script to use in ubuntu terminal

I have a script /home/user/tde.sh I want to make a one work command that will run this script when I type it into a terminal. So if I write "tetras" in a terminal window it will run my /home/user/tde.sh. How can I achieve this in ubuntu?

P.S. This is to help me achieve a desktop environment goal as I only need the desktop everynow and then I just want a quick command to run this script which will in turn start my desktop environment I am developing.

Upvotes: 1

Views: 1100

Answers (2)

konsolebox
konsolebox

Reputation: 75478

I suggest that you create a function for it:

function tetras {
     bash /home/user/tde.sh "$@"
}

And place it in ~/.bashrc.

Upvotes: 2

Erik A. Brandstadmoen
Erik A. Brandstadmoen

Reputation: 10588

# alias tetras=/home/user/tde.sh

If you wish, put that in your .bashrc file.

http://www.lehman.cuny.edu/cgi-bin/man-cgi?alias+1

Upvotes: 2

Related Questions