How to remove alias IP?

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to remove alias IP?
# 1  
Old 02-18-2010
How to remove alias IP?

I create an alias IP with this comd
ifconfig eth0:0 192.168.2.1 netmask 255.255.255.0

and then I want to delete this..


But i cand find how to it.
Can I help you?

Thanks


---------- Post updated at 05:08 PM ---------- Previous update was at 04:35 PM ----------

I want to solution myself Smilie

ifconfig eth0:2 down
# 2  
Old 03-18-2010
check that alias is stored in ur bashrc file in ur home directory which is hidden . Check it by :

Quote:
ls -la ~/.bashrc
open it with ur favourite editor and remove the alias line manually ,

OR do it from command line

Quote:
unalias IP
# 3  
Old 03-18-2010
Quote:
Originally Posted by divyaimca
check that alias is stored in ur bashrc file in ur home directory which is hidden . Check it by :



open it with ur favourite editor and remove the alias line manually ,

OR do it from command line
I think You have misunderstood.
IP here is not an alias variable to un alias it.
We can set the alias for the hostname.

You can see the alias for the host using the following command
Code:
hostname --alias

I think you thought that un aliasing a IP in different context like unsetting a variable.
Correct me if I am wrong.
# 4  
Old 03-18-2010
Quote:
Originally Posted by ygemici
I create an alias IP with this comd
ifconfig eth0:0 192.168.2.1 netmask 255.255.255.0

and then I want to delete this..

But i cand find how to it.
Can I help you?

Thanks


---------- Post updated at 05:08 PM ---------- Previous update was at 04:35 PM ----------

I want to solution myself Smilie

ifconfig eth0:2 down
Or

ifconfig eth0:0 unplumb
# 5  
Old 03-18-2010
Oh I am sorry for my wrong posting ,that alias ip can be removed by removing the interface
Quote:
(/etc/sysconfig/network-scripts/ifcfg-eth0:0)
manually

or its ok

Quote:
ifconfig eth0:2 down
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash to remove find and remove specific extension

The bash below executes and does find all the .bam files in each R_2019 folder. However set -x shows that the .bam extension only gets removed from one .bam file in each folder (appears to be the last in each). Why is it not removing the extension from each (this is $SAMPLE)? Thank you :). set... (4 Replies)
Discussion started by: cmccabe
4 Replies

2. Shell Programming and Scripting

remove brackets and put it in a column and remove repeated entry

Hi all, I want to remove the remove bracket sign ( ) and put in the separate column I also want to remove the repeated entry like in first row in below input (PA156) is repeated ESR1 (PA156) leflunomide (PA450192) (PA156) leflunomide (PA450192) CHST3 (PA26503) docetaxel... (2 Replies)
Discussion started by: manigrover
2 Replies

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

4. UNIX for Dummies Questions & Answers

using alias

I need to login to one server and then switch the user and set a number alias. But i cant modify the .profile file. I have one script avi1.sh $ more avi.sh sudo su - bil sh avi1.sh and in home directory of bil i have avi1.sh that says $ more avi1.sh alias l='ls -ltr' alias b='cd... (7 Replies)
Discussion started by: blackeyed
7 Replies

5. Shell Programming and Scripting

please help me regarding alias

Dear All, I have given alias to run a script which will calculate memory and cpu utilization as "utils" in my bash shell. Even i have given this entry in .profile and .bashrc in my home directory. It is working fine. Now my question is that I want to use this alias in... (17 Replies)
Discussion started by: naree
17 Replies

6. UNIX for Dummies Questions & Answers

Alias Help

Can someone help me with an alias...? (1 Reply)
Discussion started by: NetJones
1 Replies

7. UNIX for Dummies Questions & Answers

How to get the alias,when we have the IP.

Hi, I have to set up a printer in the system.Generally the alias is given like sdclbl1 etc.So when I ping i get the IP address. This time they have provided the IP adress.Is there any way to find the alias from this.Ping did not give the alias. Thanks and Regards, Gideon. (2 Replies)
Discussion started by: preethgideon
2 Replies

8. UNIX for Dummies Questions & Answers

alias help

Hi I have a problem when i try to set any thing as alias it works say alias sasa="cd /home/hghgg" but when i close the terminal it does not work (5 Replies)
Discussion started by: shafique
5 Replies

9. Shell Programming and Scripting

Alias

how implement functionality alias in the same way as in csh? (use Bourne type sh or bash) (3 Replies)
Discussion started by: sunhata
3 Replies

10. UNIX for Dummies Questions & Answers

Alias

Hello, I'm a beginner to Unix and I want to create an alias that lists the given directory in long format; the alias should use a pager to display the result. Thanks in advance. (2 Replies)
Discussion started by: guelpth
2 Replies
Login or Register to Ask a Question