Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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 have 2 computers my main one is XP the other one is a duel boot XP & mandrake 9.2.
I have both computers sharing the BB through a router, however being new to linux I have no idea how to access the internet on linux.
I have tried, but cannot find a way to set it up.
Can anyone supply me with a set of simple instructions.
Regards Alan.
If I've correctly understood your network architecture, the setup is very simple:
ifconfig eth0 inet your_linux_private_IP up
route add default gw your_router_IP dev eth0
And everything should go fine
OK, you have two solutions: either you browse startup menu and try to find a program named Konsole, xterm, kterm, gterm or something lik that or you switch from graphical mode to text mode by typing: <Ctrl>+<Alt>+<F1> and log as root (return to graphical mode with: <Ctrl>+<Alt>+<F7>)
if you've choosed first solution, type
Code:
counter@CS-Debian:~$ whoami
counter
counter@CS-Debian:~$ su
Password:
CS-Debian:/home/counter# whoami
root
I explain: whoami is to know who you are... the ifconfig and route command requires root (super user) privileges. So if you are not root, type su to log as root and enter root password. Then retry whoami to see if you are root
then you can type:
Code:
ifconfig eth0 inet 192.168.0.25 netmask 255.255.255.0 up
to setup your IP address to 192.168.0.25 with a netmask of 255.255.255.0
and then:
Code:
route add default gw 192.168.0.1 dev eth0
to tell your system that the gateway is 192.168.0.1 and eth0 is the NIC to access it
Originally posted by Oliv' OK, you have two solutions: either you browse startup menu and try to find a program named Konsole, xterm, kterm, gterm or something lik that or you switch from graphical mode to text mode by typing: <Ctrl>+<Alt>+<F1> and log as root (return to graphical mode with: <Ctrl>+<Alt>+<F7>)
if you've choosed first solution, type
Code:
counter@CS-Debian:~$ whoami
counter
counter@CS-Debian:~$ su
Password:
CS-Debian:/home/counter# whoami
root
I explain: whoami is to know who you are... the ifconfig and route command requires root (super user) privileges. So if you are not root, type su to log as root and enter root password. Then retry whoami to see if you are root
then you can type:
Code:
ifconfig eth0 inet 192.168.0.25 netmask 255.255.255.0 up
to setup your IP address to 192.168.0.25 with a netmask of 255.255.255.0
and then:
Code:
route add default gw 192.168.0.1 dev eth0
to tell your system that the gateway is 192.168.0.1 and eth0 is the NIC to access it
Oliv'
I tried this after logging in as root from the Konsole and text and all I keep getting is bash unknown or bad command, so now I am more confused than ever
the PATH variable contains the path where to find your executables. ifconfig and route program are in /sbin directory. So if /sbin is not in the output of "echo $PATH" either you add it (temporaly):
Code:
export PATH=$PATH:/sbin
Then you can retry ifconfig and route commands
or you type the command with his full path:
Code:
/sbin/ifconfig eth0 inet 192.168.0.25 netmask 255.255.255.0 up
/sbin/route add default gw 192.168.0.1 dev eth0
the PATH variable contains the path where to find your executables. ifconfig and route program are in /sbin directory. So if /sbin is not in the output of "echo $PATH" either you add it (temporaly):
Code:
export PATH=$PATH:/sbin
Then you can retry ifconfig and route commands
or you type the command with his full path:
Code:
/sbin/ifconfig eth0 inet 192.168.0.25 netmask 255.255.255.0 up
/sbin/route add default gw 192.168.0.1 dev eth0
I hope this time that'll work
I have tried your latest suggestion but when I type in root@olinux-lfs:~# echo $PATH it is comong up as a bad command root@olinux-lfs:~#
Would it be better to reinstall Mandrake 9.2 and configure the internet in the setup?
Sorry I made you make a mistake
In fact you just have to type echo $PATH ... You made a mistake cause I did a copy/paste from my shell, and I've included my bash prompt.
But the most important part is:
Code:
/sbin/ifconfig eth0 inet 192.168.0.25 netmask 255.255.255.0 up
/sbin/route add default gw 192.168.0.1 dev eth0
Tried the echo $PATH and this is the reply.
- bash: echo/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/home/alan/bin: no such file or directory.
Does this help
A friend told me I was not using root and to type in the console su and then my password but this did not work either
I got no such file or directory, thanks for your help and time .
How can I check I am in root as at the command I get [alan@local host alan] $. Is this root?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.