SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I Installed Slackware 8.1 on Monday of this week and have been enjoying everyday since. this is a work machine and so I get to play while I get payed..... Since it is a learning expiernce for me and my background knowledge with linux is limited to a little playing around a year ago. I sit in the office and try to find things to do to the computer. Ways to make it better and things totry etc... On of my coworkers wants me to put it on our network and se how it deals with that sort of stuff, I have tried searching for a little while but cannot find what file I need to modify to change the IP address, Anyone know. I am looking to learn from this so if there is an easy way and a hard way then I would like to know both...... I know this is long and dumb but I am having fun and looking for some help.....
Well first of all, when you ran setup did you let it configure your network for you? If not, you'll need to get to a root account and run 'netconfig'... it will ask you the basics, like static or dhcp, dns, gateway, and what not, then at the end it will try to probe your ethernet card. I havn't yet found an ethernet card it can't probe, while other distros sometimes have problems. Once you run netconfig, still as root you can run 'ifconfig' and it will show you what interfaces are currently up and other misc. information about them.
edit /etc/rc.d/rc.inet1 with a text editor (pico as example)
the adress your system assign to eth0 and eth1(ethernet card #0 and #1) at boot are inside. Just change it as what you want.
Or if you want to change your IP on-the-fly, just type this :
ifconfig eth0 your_ip
Et voilą! no need to reboot.
In reference to editing the rc.inet.1 and rc.inet.2 if you run netconfig it edits inet.1 for you. Plus it's a somewhat nice interface for setting it up...if you have a second ethernet card I reccomend using rc.local to inititlize it like this:
Code:
# First we set the ip address and misc shitza:
IPADDR="192.168.0.1" # Internal IP
NETMASK="255.255.255.0" # Netmask
NETWORK="192.168.0.0" # Network Address
BROADCAST="192.168.0.255" # Broadcast Address
GATEWAY="" #Gateway
# now we set up the nic:
echo "Configuring eth1 as ${IPADDR}..."
/sbin/ifconfig eth1 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
The second assuming that you have the proper module loaded for that specific ethernet card.
I'm assuming here that your net card module is loaded. And assuming you only have one card for your network.
Now, instead of speaking about config files, i'm simply going to tell you about the "ifconfig" command.
You asked for a way to change IP adress, here it is : ifconfig.
Just run :
this is basically what you need to change IP/NetMAsk/Broadcast on your linux box.
The rc.inet1 and co. files mentionned above are just files launching ifconfig while starting your system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.