Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I just installed linux mandrake 10.0, in the konsole.. no command is working.. for example when i write "lspci" or "ifconfig" i get command not found.. other then that i'm trying to get internet connection but without these commands i can't tell whats wrong. as you can guess i'm very new to linux so any help apreciated..
thanx

It sounds as if you do not have the software
installed (lspci or ifconfig). These
are 'external' commands, which means that
they are not built into bash (the cli
command interpreter).If you enter at the command prompt:
urpmf lspci
you will get a list of associated package
names - the first line should be:pciutils:/usr/bin/lspci
This tells you that lspci is included in the
pciutils package. To install this package
enter at the command prompt:urpmi pciutils
urpmi is the command line package
installation tool included with Mandrake /
Mandriva. It will ask to install any additional packages required by the package you request. Answer yes (or y) when asked and the listed packages will be installed for you.To learn more about the package management tools provided with Mandrake use the man (for manual) utility. At the command line enter:
man urpmi
to get a brief page about using urpmi. At the bottom of the man page (reached most easily with the [END] key) will be a list of associated programs (including urpmf, urpme, etc.).
If you run urpmf ifconfig, you should get a list including:
net-tools:/sbin/ifconfig
so the package for ifconfig is net-tools.
I use Mandriva 2007 here, so the package names may differ slightly from what was used in Mandrake 10.0, but urpmi and company should be installed as part of the default system.
Ernie Registered Linux User 247790
ICQ 41060744

...or you may just be logged on as a regular user and both ifconfig and lspci normally reside in /sbin and /usr/sbin which are only in root's path. Try passing the whole path in the command like "/sbin/ifconfig" or use sudo or su to log on as root.

Tanks for the info..
I typed "urpmf net-tools", I got lines starting with "net-tools:/bin/dnsdomainname", some of the lines included lspci and ifconfig. Does that mean it's installed? (the commands still don't work) I typed also "urpmf lspci" and ifconfig but still don't work. netstat however does work.
I'm I on the right track?
Thanx

"...the commands still don't work..."
So you are saying that if you type /sbin/ifconfig you get "command not found"?!? I find that quite hard to believe....

it does work!!!
as you can probably understand i very new to linux...
i'm connected to a switch that is connected to the internet and i'm supposed to get ip from dhcp.. can you tell me how am i supposed to get connected? (ifconfig says i have 127.0.0.1 for an ip..)
Thanx again

The easiest way would be graphically using mcc (Mandrake Control Centre) or the mandrake network config tool which I think is called draknet (sorry, I haven't used mandrake for ages!). Fingers crossed it should bring up a nice GUI where you can set your network card (eth0) to DHCP.
Saying that, learning to use ifconfig and other similar commands means that if you change distro you can still configure it without distro-specific tools, eg yast for suse, pkgtool for slackware etc.
You should have one of two programs installed called either dhclient or dhcpcd. To set your nic to DHCP:
Switch user to root (note the - at the end of the command)
$ su -
(enter root's password)
Your prompt should change from a $ to a #. Now try to obtain a DHCP lease
# dhcpcd eth0
Sit back for a little bit as it can sometimes take a while. If you get a "command not found" try "dhclient eth0" instead. With any luck you should receive no error and be returned to a root prompt. You can now log out as root, I use Ctrl&D, and your prompt should change back to a $.To check your settings such as IP address
$ /sbin/ifconfig eth0
Your default gateway
$ /sbin/route
and your DNS servers
$ cat /etc/resolv.confYou can also use the ifconfig and route commands to set your nic up manually, eg:
# ifconfig eth0 192.168.0.10 broadcast 192.168.0.255 netmask 255.255.255.0
# route add -net default gw 192.168.0.1 netmask 0.0.0.0 metric 1Hope you could follow some of that!

![]() |
Fedora upgrade gone bad
|
Linux download
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |