LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-23-2003, 01:05 AM   #1
drfrankie
LQ Newbie
 
Registered: Jun 2003
Location: Sunny South Florida
Distribution: Slackware 9.0
Posts: 18

Rep: Reputation: 0
making life a little easier


Hi.. I have been using linux exlusively for about a month and I completely love it!

My newbie question is the following:

I would like to know how I can make a "shortcut" for long things. Here is an example of what I'm after. To connect to my computer upstairs I type "ssh -l username 192.168.x.x" everytime I want to connect. Coundn't I do something so that when I typed "upstairs" it would connect me. I know there is a way, but I have no clue on how to find this information.

Do I need to write a simple shell script for this? can you show me an example of how I might do this? Will making an alias work? How?

Google and man pages have gotten me this far, but now I am lost. I am sure your answer will open a whole new world of linux computing for me!

thanks,
drfrankie
 
Old 06-23-2003, 01:14 AM   #2
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Alias it is, nice work. Open (or create) a file in your home directory called .bashrc with your favorite text editor (in my example, I'll use vim):
vim ~/.bashrc
Add the lines:
alias upstairs="ssh -l username 1.2.3.4"

Save and exit (with vim it's: SHIFT + ZZ)

Now you will have to "source" the file:
source ~/.bashrc
And the alias is set. There are threads on how to setup your system to "source" your bashrc file, so I won't go into that.

Cool
 
Old 06-23-2003, 11:05 AM   #3
drfrankie
LQ Newbie
 
Registered: Jun 2003
Location: Sunny South Florida
Distribution: Slackware 9.0
Posts: 18

Original Poster
Rep: Reputation: 0
Works perfectly.. Thanks alot!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Serious questions about life ( or better the life of a programmer) alaios Programming 11 10-04-2005 11:37 AM
M$ Making a Linux takeover easier... JaseP General 15 01-28-2005 02:32 PM
:::::::Request for making Gnu/Linux easier for new users(like me)..-::::::: explosive Linux - Software 3 07-20-2004 09:05 AM
ProFTP-this has got to be easier than I'm making it, please help! fireman949 Linux - Software 2 04-17-2004 05:54 PM
dhcpcd: making life hard! e1000 Slackware 4 12-06-2003 01:33 AM


All times are GMT -5. The time now is 11:12 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration