Visit Our UNIX and Linux User Community


Permanent Alias


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Permanent Alias
# 1  
Old 11-21-2007
Permanent Alias

On AIX 5.2 as root, installed Seamonkey and have to type
#/seakey/seamonkey/seamonkey to get it to run, which it does okay.
To set up a permanent alias, I did the following
(1) In a text editor
alias seamk='/seakey/seamonkey/seamonkey'
and saved it to /home/alias_file
(2) In a text editor added to /etc/security/.profile
ENV=/home/alias_file
export ENV
(3) Did a #shutdown -Fr and on start up in a terminal put #seamk and the Seamonkey browser does not open.
(4) If I put in a terminal
#alias seamk='/seakey/seamonkey/seamonkey'
then in a terminal
#seamk the Seamonkey browser opens okay.

Would appreciate what error I am making in the permanent alias setup.

Thanks
# 2  
Old 11-21-2007
Helo farl,
fisrt of all, I don't think you need to reboot your system to apply those kind of changes... Smilie

Back to your issue, I would just add:

alias seamk=/seakey/seamonkey/seamonkey

to my $HOME/.profile

Or, if you want it to be availabe for every user, just:

ln -s /seakey/seamonkey/seamonkey /usr/bin

would be enough...

Regards.
# 3  
Old 11-22-2007
Permanent Alias

Grial thanks for your reply.
I deleted alias_file out of /home and deleted the two lines I put in /etc/security/.profile to get back to a clean slate.
You said:

" alias seamk=/seakey/seamonkey/seamonkey
to my $HOME/.profile "
I do not have a $HOME/.profile on the computer, only a /home which does not contain any .profile file
Running #set it shows HOME=/

You further said:
" Or, if you want it to be availabe for every user, just:
ln -s /seakey/seamonkey/seamonkey /usr/bin "
I like this solution better, but there is nothing in your command line to tell the computer that seamk is actually
=/seakey/seamonkey/seamonkey as when the alias is set up it is all lost when the computer is turned off.

Help really appreciated.
# 4  
Old 11-22-2007
Quote:
Originally Posted by farl
Grial " alias seamk=/seakey/seamonkey/seamonkey
to my $HOME/.profile "
I do not have a $HOME/.profile on the computer, only a /home which does not contain any .profile file
Running #set it shows HOME=/
You DO have a $HOME, you've seen it for yourself (HOME=/).
If $HOME/.profile does not exist, just create a new one and add the alias but, before you ask it, logoff and login again after that.

Quote:
Originally Posted by farl
You further said:
" Or, if you want it to be availabe for every user, just:
ln -s /seakey/seamonkey/seamonkey /usr/bin "
I like this solution better, but there is nothing in your command line to tell the computer that seamk is actually
=/seakey/seamonkey/seamonkey as when the alias is set up it is all lost when the computer is turned off.
I was just giving you some hints, but OK, here I go:
Code:
ln -s /seakey/seamonkey/seamonkey /usr/bin/seamk

As you can see it's as simple as a "man ln"

Regards.
# 5  
Old 11-22-2007
Another approach is to

(a) create a bin directory in your home directory

(b) put all the links you want in that

(c) add $HOME/bin to PATH in an appropriate profile file.
# 6  
Old 11-22-2007
Quote:
Originally Posted by porter
(c) add $HOME/bin to PATH in an appropriate profile file.
That's a good option if you do not have access as root.
Take into account that in this case, HOME=/ and there, most probably, are a /bin already owned by root with oter binaries inside. Anyway, as you said, it's another way Smilie
# 7  
Old 11-22-2007
Permanent Alias

Grail and Porter thanks for replies.

Creating a .profile file containing
alias seamk=/seakey/seamonkey/seamonkey
at / or at /home did not work, just got
/usr/bin/ksh seamk:not found.

Using the second method
ln -s /seakey/seamonkey/seamonkey /usr/bin/seamk
worked okay on AIX 5.2 machine.

On my AIX 5.1 machine where I use /sea/seamonkey/seamonkey to open the browser the second method
ln -s /sea/seamonkey/seamonkey /usr/bin/seamk
worked okay.

On my AIX 5.3 machine where I use /usr/bin/firefox to open the browser the second method
ln -s /usr/bin/firefox /usr/bin/fire
did not work, I got
run-mozilla.sh: cannot execute /usr/mozilla/firefox/fire-bin

Could I trouble you for one more reply.
Do I have to uninstall or delete anything where the ln -s command did not work on AIX 5.3. Am content to enter /usr/bin/firefox each time to run the browser.

Thanks


PS On a sad note, was just starting to type in the ln -s command on my 7043 running AIX 4.3.3/Firefox and she died. Looks like planar or powersupply failure.
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #325
Difficulty: Medium
Early RAM was not directly seated onto the motherboard so it could easily changed and upgraded.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Create alias files (not alias commands)

If one: $ find -name 'some expression' -type f > newfile and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory. I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies

2. Solaris

How to set permanent aliases?

Hi All On my Solaris 10 X86, under my root directory I have a file called Aliases. It is owned by root (root:root) and the user (I mean root) has rwx permissions. In this file I have set some aliases like the following alias a="cd /opt/IBM/WebSphere/AppAerver/Profiles" When I run the above... (0 Replies)
Discussion started by: chrs0302
0 Replies

3. UNIX for Advanced & Expert Users

rm non-permanent delete

I read this article as a way to do a non-permanent of something. I saw 2 problems. The first that my rm is located at /bin/rm. I would assume I would change the location to /bin/rm. The second my rm is a executable file and not a text file. So will replacing my rm file with the shellscript... (3 Replies)
Discussion started by: cokedude
3 Replies

4. HP-UX

set permanent ulimit

Hi all I have a request from user to change the file descriptors limit to 8192. The current setting are: root@xxxxx:(wmdev)> ulimit -a time(seconds) unlimited file(blocks) unlimited data(kbytes) 1048576 stack(kbytes) 131072 memory(kbytes) unlimited... (3 Replies)
Discussion started by: hedkandi
3 Replies

5. UNIX for Dummies Questions & Answers

Making an alias permanent

Hi mates, I want to make an alias permanent for a KShell, does someone knows how to do that? Thanks! (4 Replies)
Discussion started by: agasamapetilon
4 Replies

6. Solaris

Permanent changes to PATH

Hi guys, I'm running Solars 8 on a V100 server at home for testing. If I switch user to root and do: # echo $PATH This is the output: /usr/sbin:/usr/bin I'm using rsync over ssh and need to add /usr/local/bin and /user/local/sbin. I do this by running the line: #... (3 Replies)
Discussion started by: Stin
3 Replies

7. Shell Programming and Scripting

making the changes permanent in a file

Hi Friends. I have a file called install.data which has fields like : XXXXX ACVCGFFTFY UAHIUH OI CONNECTION=tape/11/ LOCATAION=08-90-89 SIZE=90 I had to change the values of some of these variables. So i did : grep "SIZE" instal.data | sed 's/*/00/' ...this is working fine on command... (4 Replies)
Discussion started by: vijaya2006
4 Replies

8. Solaris

permanent route

How do I make a route permanent, other than default route on a Solaris server? (1 Reply)
Discussion started by: jontom
1 Replies

9. AIX

Permanent Default Route

Hi, We are running AIX 5.2. Our default gateway used to be IP Address A. Our new default gateway is IP Address B. A netstat revealed that our default route was IP address A. We manually added default route with IP address B and removed the default route with IP address A. However,... (3 Replies)
Discussion started by: DenD
3 Replies

10. IP Networking

Permanent ip routing

I am trying to add a permanent route on my server, but whenever i reboot it dissapears. Please does anyone know the correct command to use. route add XXX.XXX.XXX.XXX DDD.DDD.DDD.DDD the above is what i have done. ednut:) using IRIX SGI software. (2 Replies)
Discussion started by: Ednut
2 Replies

Featured Tech Videos