How do I change IP addresses in command mode...


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How do I change IP addresses in command mode...
# 1  
Old 06-04-2004
How do I change IP addresses in command mode...

How do I change IP addresses in command mode? i need to assign custom (non DHCP) addresses from the command line. Actually I also need to know how to change the subnet mask, the gateway and the primary, secondary, ... dns servers.
# 2  
Old 06-04-2004
man ifconfig
man route

Cheers
ZB
# 3  
Old 06-04-2004
We need to know specifically which unix system you are using. "uname -a" should tell you.

Running command like route and ifconfig can change things now, without a reboot.

Also we need to know if you want the changes to persist after a reboot. If so, this involves changes to the startup scripts.

The dns stuff is usually in /etc/resolv.conf.
# 4  
Old 06-04-2004
Yes i'd like changes to be persistent, and i am now running fedora core 1, but i'll post the kernel version later because i am planning to install freeBSD on another machine (just to learn)
# 5  
Old 06-05-2004
Seeing as Fedora Core is (basically) a follow on from Red Hat, my response to the post
here about setting up persistent networking configuration on RedHat AS should help you out.

As Perderabo points out dns is configured in /etc/resolv.conf

Cheers
ZB
# 6  
Old 06-07-2004
Thks... I'll try it...
# 7  
Old 06-09-2004
dont forget /etc/hosts if you change your server IP...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Homework & Coursework Questions

Search email addresses using grep command

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Let's say if we have a file with a lot of information. For example: iiadam otterhedgehog kayleigh... (2 Replies)
Discussion started by: ForeignGuy
2 Replies

2. AIX

Change Param File Variable Test Mode Value

First two days of shell scripting... I've looked at awk/sed and man sed only to get off into the weeds of complexity that may not be needed here... hints for awk or sed or other method to magically change the bolded item below? Nutshell: HFTST=Y #test mode = true to false & back again so... (0 Replies)
Discussion started by: JeffPGMT
0 Replies

3. UNIX for Advanced & Expert Users

Change mode drwxrwsr-x+ directory

Hi, How to change mode "drwxrwsr-x+" in directory. I'm able to set drwxrwsr-x but "+" is difficult to set. ~ $ las -las | grep done1 4 drwxrwsr-x+ 3 root sfuser 4096 Nov 26 16:39 done1 ~ $ getfacl done1 # file: done1 # owner: root # group: sfuser # flags: -s- user::rwx... (4 Replies)
Discussion started by: justbow
4 Replies

4. AIX

Change processor compatibility mode without hmc

Hello, One of my colleagues is working on a p730 without HMC, only one LPAR has all resources. The server is showing some issues with Informix (10.00 & 11.50), the same config (OS & IFX) works perfectly on Power6 so I would like to ask him to change the processor compatibility mode to power6 on... (3 Replies)
Discussion started by: fapl
3 Replies

5. Shell Programming and Scripting

one line command to change mode only if necessary

hi, sorry for posting this for a quick answer. Is there a one line command to change permissions on files in a directory to a given mode (say 554) and only for those files that do not already have that mode? Running chmod updates the last access/modified timestamp on the files, and i want to... (11 Replies)
Discussion started by: ysrini
11 Replies

6. Shell Programming and Scripting

Creating a sed script to change ip addresses in a file

So I'm new to this sed command and I am trying to create a script that replaces ip addresses when I name a file but can't tweak it to work. Here is what it looks like: #!/bin/bash # file=$1 # sed -e 's/-CPUaddr 10.30.10.166/-CPUaddr 10.30.10.151/g' -i "$file" sed -e 's/-CPUaddr... (10 Replies)
Discussion started by: uradunce
10 Replies

7. Solaris

[Solved] How to change my default login mode????

Hi guys, I have just installed Solaris 10 x86. My system boots into graphical login by default, I want to have text login only, where can I change that. I tried to use the linux and bsd concept of editing /etc/inittab, and change the default value to 3, but that doesn't work in Solaris. Please... (6 Replies)
Discussion started by: gabam
6 Replies

8. Shell Programming and Scripting

change the mode of the file after FTP

Hi I am FTPing a file to a remote server from my local server. But after I FTP it the permissions are not in executable option, I need to change the permissions of the FTPed file how can i do that. Below is my script LOCALDIR=/batch/ediprocess LOCAL_BACKUP_DIR/batch/ediprocessBackUp... (4 Replies)
Discussion started by: shanth_chandra
4 Replies

9. HP-UX

change time mode from BST to GMT

I want to know how to change the time zone from BST to GMT avoid the daylight savings in hp-ux (3 Replies)
Discussion started by: tomjones
3 Replies

10. IP Networking

Ip Addresses With Hardware Change

I have 2 identical printers with the same IP on my network. One is only used as a backup for the primary printer and both are never on line at the same time. The goal was to always keep only 1 on and have an use the other printer as an immediate backup if necessary. But when I switch the cable I... (4 Replies)
Discussion started by: golfs4us
4 Replies
Login or Register to Ask a Question