How to find file which stores IP address

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to find file which stores IP address
# 1  
Old 04-01-2012
Java How to find file which stores IP address

Hi all,

I am new to this forum and this is my first question Smilie. Using Red hat Linux.I tried to find file which stores IP address based on different helps given in this forum but did not get success. Here is the system details:
Code:
-bash-3.2$ lsb_release -a
LSB Version:    :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description:    CentOS release 5.5 (Final)
Release:        5.5
Codename:       Final
-bash-3.2$ pwd
/etc/sysconfig
-bash-3.2$ cd ..
-bash-3.2$ vi redhat-release
CentOS release 5.5 (Final)

Where is the file located in case of Red hat system?

Moderator's Comments:
Mod Comment Welcome to these forums. Please use [code][/code] tags for script and data sample....

Last edited by Scrutinizer; 04-01-2012 at 07:45 PM..
# 2  
Old 04-01-2012
if-config will show you the IP addresses for network interfaces.

The config files are under /etc/sysconfig/network-scripts/.

(on RHEL anyway, but I think it's the same for CentOS)
# 3  
Old 04-01-2012
I'm sure I understand what your asking. Well here is guess.

Have you looked at your /etc/hosts file? lets say your servers name is loki.
For example:
Code:
username@loki> more /etc/hosts

# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost      loki
255.255.255.255 broadcasthost
::1             localhost      loki
fe80::1%lo0     localhost

10.0.0.21   loki
10.1.0.31   loki-2
10.1.0.41   loki-sc

In this example 10.0.0.21 is the normal ip address. The loki-2 is the loki server on anther network. loki-sc is the name and IP address for the remote console of the loki server. If you use DNS then this info will be on the DNS server.

I hope this was useful.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

HELP simple script to find e-mail address on a file

Hello guys, im new to to unix/linux i have a text file like this: person1@test.com iisiiasasas person2@test.com 123w2 3233 sajsja person3@test.com jsajjsa sajsjasaj person4@test.com I want to extract only e-mail address and get rid of all other stuff, i want an output like this ... (4 Replies)
Discussion started by: RazorMX
4 Replies

2. Cybersecurity

SSL Certificate Stores

Hey everyone, I'm trying to get a lay of the land for OS and Application Certificate Stores. Can someone confirm that I have this concept right? If the application you're using say Firefox has it's own trusted CA store, it uses that exclusively. So if you're running firefox in Windows, Firefox... (4 Replies)
Discussion started by: Lost in Cyberia
4 Replies

3. UNIX for Dummies Questions & Answers

How to Find another IP address

Hi Guys, I want to find another(Local host) machine IP address from my machine.. We are all connected in the same server, I mean same LAN. What i done is Connected with that user machine using SSH and SU.. After that i used IFCONFIG but it shows my Ip address. Can not able to get the... (8 Replies)
Discussion started by: Adhi
8 Replies

4. UNIX and Linux Applications

Where Octave stores it's variables

Hej guys, I'm doing some simple matrix operations with octave and don't know where and how it stores it's variables. Is there any file somewhere that could be accessed? I was using MATLAB before and now Octave is new for me. Or maybe I should use some commands to save and load it. but... (0 Replies)
Discussion started by: Johanni
0 Replies

5. Shell Programming and Scripting

FTP stores unwanted chars to output file

I want to only store date of all files. However, the below script also store unwanted FTP related lines to output file. Could someone tell me how to ignore them (see output first 6 lines)? Thanks #Defining variables and assigning values USR='admin' PASSWD='abc'... (3 Replies)
Discussion started by: dipeshvshah
3 Replies

6. UNIX for Advanced & Expert Users

Find LAN Address

Hi, I am wondering how I can find the network address under following situation. Things available: 1. An active network drop without knowing any details about the network. 2. I have windows, Linux, and Solaris machine available to use. Things to achieve: 1. Find out the... (5 Replies)
Discussion started by: jiashi2
5 Replies

7. UNIX for Advanced & Expert Users

how unix stores command history

Hi techies, I have a doubt upon the command history utilities in Unix ... As far as I know, history stores the event number and command for upto that many number of previous commands executed in the HISTSIZE variable ... my doubt here is can we get the time in which these commands were... (3 Replies)
Discussion started by: Sabari Nath S
3 Replies

8. UNIX for Dummies Questions & Answers

How to find i.p address of our server

I don't have root access. How do I find i.p address of our sun server? Thanks. (4 Replies)
Discussion started by: vpotluri
4 Replies
Login or Register to Ask a Question