How to make Alias?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to make Alias?
# 8  
Old 12-09-2011
Code:
[user01@rkfvm01 home]$ pwd
/home


In above path , i have typed

Code:
vim .bashrc


but its creating new file? its not already created file ?

1)i have to create alias in this new file?

Last edited by aish11; 12-09-2011 at 07:57 AM..
# 9  
Old 12-09-2011
On what system are you working? (platform - OS)
Are you sure your shell is bash?
# 10  
Old 02-02-2012
its

Code:
Linux VREDTEST2 2.6.32-131.0.15.el6.x86_64 #1 SMP Sat May 21 10:27:57 CDT 2011 x86_64 x86_64 x86_64 GNU/Linux

---------- Post updated at 01:55 AM ---------- Previous update was at 01:25 AM ----------

Hi All,

Need reply plz
# 11  
Old 02-02-2012
Please post the output of the following:
echo $SHELL and $SHELL --version

If your shell is bash, try the following:
Check in all of the .sh files in /etc/profile.d/ directory for aliases defined. In whichever .sh file you make the changes, you've to ensure that this file would be called during system startup. Which .sh files from profile.d dir are loaded during startup can be checked in file /etc/bashrc. Mostly all of them would be loaded using a for loop.
# 12  
Old 02-02-2012
Hi Balajesuri,

see the output

Code:
[user01@vm02 sbpersistence]$ echo $SHELL
/bin/bash
[user01@vm02 sbpersistence]$ $SHELL --version
GNU bash, version 3.00.15(1)-release (i686-redhat-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.

and inside profile.d i am bale to see below files, what does it mean...where i can right my alias?
Code:
[user01@vm02 profile.d]$ ls
colorls.csh  glib2.csh  java.sh  kde.sh    krb5.sh   lang.sh   less.sh  vim.sh
colorls.sh   glib2.sh   kde.csh  krb5.csh  lang.csh  less.csh  vim.csh  which-2.sh


Last edited by aish11; 02-02-2012 at 03:43 AM..
# 13  
Old 02-02-2012
I don't know. It depends on what's configured in your /etc/bashrc file. Open /etc/bashrc in vim and see which .sh files from profile.d dir is getting loaded.

This is how it is, in my /etc/bashrc:
Code:
for i in /etc/profile.d/*.sh; do
    if [ -r "$i" ]; then
        . $i
    fi
done

If this is the case in your /etc/bashrc too, then you can put your alias lines in any of .sh file.
My best guess is, try inserting aliases in kde.sh but only after you've done the above.
# 14  
Old 02-02-2012
on my sysystem there is one alias available.

when i enter sbp it goes to the below path.

i.e sbp =/home/user01/bin/exercise/sbp


but i am not able to see this alias in any of the .sh inside profile.d folder
 
Login or Register to Ask a Question

Previous Thread | Next Thread

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. Programming

Issue with make, no rule to make target etc.

I have been trying to split up my src directory to clear out files that are not re-compiled very often. Now I have the following setup in my trunk, trunk/bld trunk/src/ trunk/src/src_server trunk/makefile.linux In the make file, I have compile rules SOURCELOC = src # compile src c++... (4 Replies)
Discussion started by: LMHmedchem
4 Replies

3. UNIX for Dummies Questions & Answers

How to make delays between multiple commands in an alias (ircII)?

Okay so I have an alias that looks like this: ALIAS gscn { MSG gscn Test1 MSG gscn Test2 MSG gscn Test3 MSG gscn Test4 MSG gscn Test5 } How do I make it wait 5 seconds between each command before it executes the next one after that in order from top to bottom? I tried the TIMER... (1 Reply)
Discussion started by: guitarscn
1 Replies

4. UNIX for Dummies Questions & Answers

Difference between configure/make/make install.

Hi, While installation of apache on linux, we perform the below tasks. 1) Untar 2) configure 3) make 4) make install. I wanted to understand the difference and working of configure/make/make install. Can any one help me understanding this? Thanks in advance. (1 Reply)
Discussion started by: praveen_b744
1 Replies

5. UNIX for Dummies Questions & Answers

How to make a make from other folder

Hi, Sorry for my English. I want Execute a make from other folder but no it's a normal make. The comand is: make telosb install,3 And for example if i have to execute this comand in /tmp and i am in /$HOME how he would be now the comand? thx (7 Replies)
Discussion started by: Grobix
7 Replies

6. Solaris

Gani Network Driver Won't Install - make: Fatal error: Don't know how to make targ...

I attached a README file that I will refer to. I successfully completed everything in the README file until step 4. # pwd /gani/gani-2.4.4 # ls COPYING Makefile.macros gem.c Makefile Makefile.sparc_gcc gem.h Makefile.amd64_gcc ... (1 Reply)
Discussion started by: Bradj47
1 Replies

7. UNIX for Dummies Questions & Answers

How to make alias for start of next sessiones

Good morning Dear Friends Please tell me how can be don't alias which is not Temporary.I mean in next log it to be there specially for AIX and HP UNIX.Thanks in advance. (0 Replies)
Discussion started by: papa1980
0 Replies

8. Linux

Error in issuing a make and make install

Hi, Recently I install a package and try to do a make and make install. However, in the make it gives me below error:- make:Nothing to be done for 'install-exec-am' make:Nothing to be done for 'install-data-am' Can anyone please explain to me what does this mean? I have been trying... (1 Reply)
Discussion started by: ahjiefreak
1 Replies

9. Shell Programming and Scripting

How to make Alias

Dear all, I'm new in unix systm , I try to write alias script: alias hr= cd/home/hmi/bin/Log and this work, but when i quit from unix and login again, this can't work again. how to create alias that can work anytime thank you Regards Heru (1 Reply)
Discussion started by: heru_90
1 Replies

10. UNIX for Dummies Questions & Answers

make and make install commands

Hi there, I am installing a package at the moment on to my Solaris version 8 and I have run into a problem with the 'make' command. I have installed the package using the 'pkgadd' command and I am now at the stage where I have to use the 'make' command followed by the 'make install'... (4 Replies)
Discussion started by: gerwhelan
4 Replies
Login or Register to Ask a Question