LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   How to make slackware setup network interfaces on boot? (http://www.linuxquestions.org/questions/slackware-14/how-to-make-slackware-setup-network-interfaces-on-boot-4175479264/)

austinramsay 10-01-2013 08:06 PM

How to make slackware setup network interfaces on boot?
 
1 Attachment(s)
I'm new to slackware and I've read that I needed to configure /etc/rc.d/rc.inet1.conf for all my network settings. I need eth0 to be set at 192.168.200.105, netmask 255.255.255.0, and my wlan0 to be set to essid dlink, and use dhcp on boot. What do I need to do? Here is my /etc/rc.d/rc.inet1.conf attached. Thanks!

zrdc28 10-01-2013 11:50 PM

Just leave rc.inet1.conf as is.

1 Plug in your ethernet cable
2 go to root terminal and type netconfig
3 Answer the questions as you wish,and enter, You should now be on the internet.

To get networkmanager working for wireless!
1 go to cd /etc/rc.d
2 ls to make sure you are in the correct directory.
3 Make it executable chmod +x rc.networkmanager.
4 now go to networkmanager in the taskbar and click and choose your network and enter password

You might to reboot after the above!

NoStressHQ 10-02-2013 12:30 AM

Quote:

Originally Posted by zrdc28 (Post 5038361)
You might to reboot after the above!

Or just restart the right service... (But I never remember which one :) )...

Code:

# /etc/rc.d/rc.inet1 restart
# /etc/rc.d/rc.inet2 restart
# /etc/rc.d/rc.networkmanager restart

It's faster than a reboot even if restarting both 'inets' is overkill... If someone knows which one is sufficient, you're welcome :).

(Of course replace 'restart' by 'start' if it was not yet started...)

Cheers.

Edit: maybe I didn't really understood the question, but as zrdc wrote, any script which is "executable" in /etc/rc.d/ is ran on startup (=boot) so you're ok after that...

NoStressHQ 10-02-2013 12:35 AM

Quote:

Originally Posted by zrdc28 (Post 5038361)
1 go to cd /etc/rc.d
2 ls to make sure you are in the correct directory.
3 Make it executable chmod +x rc.networkmanager.

And changing directory is useless, if you fully qualify the file name as a full absolute path... Bash completion (press tab) helps...

Code:

# chmod +x /etc/rc. <tab>
# chmod +x /etc/rc.d/rc.netw <tab>
# chmod +x /etc/rc.d/rc.networkmanager

You CAN'T do any mistake... (Tab twice do an equivalent of "ls" proposing alternatives if there are ambiguities...)

austinramsay 10-02-2013 12:44 AM

Thank you! Out of curiosity, and for the sake of needing the knowledge when I don't have a gui, how would you do this manually?

NoStressHQ 10-02-2013 12:50 AM

I don't really understand your question, as everything we wrote can (must) be done in a terminal (and can even be done remotely through ssh once setup).

What do you mean by "manually" ?

Edit: all these are done in the text terminal, by default when you start slackware after an install... Log as root/or if logged as a simple user issue a "su" command:

Code:

YourPrompt $ su
Enter root password...
RootPrompt # ...

a '$' prompt is for a 'casual' user, as '#' means you're root, it's a hint when you see command snippets...

If you're inside a DE, simply open any terminal application and do the same thing...

allend 10-02-2013 12:52 AM

From the SlackDocs wiki.
http://docs.slackware.com/slackware:...e_your_network
and linked from the above but more directly relevant.
http://alien.slackbook.org/dokuwiki/...eless_networks

NoStressHQ 10-02-2013 12:58 AM

So you can read the blend of zrdc28's answer and mine as:

If your a simple user, go as root
Code:

$ su -
Password...
#

Then as root:
Code:

# netconfig
(There will be a nice ncurse interface... then done)

For wifi (still as root)
Code:

# chmod +x /etc/rc.d/rc.networkmanager
# /etc/rc.d/rc.networkmanager start

That's it...

Edit: oh maybe you meant to choose the wifi if you don't have the task bar ? There's a command line tool, I don't remember the name, try typing "net" and completion with <tab>... And read the doc, it might be pointed inside (See allend answer :) )
Edit2: or "wicd..." something...

Didier Spaier 10-02-2013 05:54 AM

This command:
Code:

nm-applet
typed as a regular user, will bring a nice widget on your desktop or windows manager with which you can manage all your network interfaces (wired and wireless).

austinramsay 10-02-2013 01:55 PM

Quote:

Originally Posted by NoStressHQ (Post 5038392)
So you can read the blend of zrdc28's answer and mine as:

If your a simple user, go as root
Code:

$ su -
Password...
#

Then as root:
Code:

# netconfig
(There will be a nice ncurse interface... then done)

For wifi (still as root)
Code:

# chmod +x /etc/rc.d/rc.networkmanager
# /etc/rc.d/rc.networkmanager start

That's it...

Edit: oh maybe you meant to choose the wifi if you don't have the task bar ? There's a command line tool, I don't remember the name, try typing "net" and completion with <tab>... And read the doc, it might be pointed inside (See allend answer :) )
Edit2: or "wicd..." something...

Thanks! Yeah sorry shouldve been more specific about that! Yes i meant the wifi without having a task bar. Also one more question, so I have my eth0 thats connected to my sun t2000 server so it needs to be set on a static ip on boot. I need it to be set at 192.168.200.105. How can I do that? Is that with netconfig also?

Didier Spaier 10-02-2013 02:13 PM

Quote:

Originally Posted by austinramsay (Post 5038770)
How can I do that? Is that with netconfig also?

Yes.


All times are GMT -5. The time now is 02:28 PM.