I recently got a new cable modem and my internet connection is no longer working. I suspect I need to renew my IP address. How can I renew my address?
The command ifconfig
returns:
bash: ifconfig: command not found
The command dhclient
returns:
bash: dhclient: command not found
I am using Debian 7 (Wheezy).
------- ANSWER
It appears the problem was that I was trying to mess with the network using my user account, which I did not realize was not a good idea. I must have been logged in as root when I did it before. The easy solution is:
sudo /sbin/dhclient eth0
This command reset my connection and my Debian system has network connectivity again. The key thing, as the answer below noted, is that user accounts do not normally have /sbin in the path, so you have to give the explicit path to dhclient if you using it via a user account.
/sbin
isn't in the path. 6,125 people came here and the answer is well upvoted. Clearly it's useful. And, I can reproduce it./sbin
and/usr/sbin
are not in yourPATH
, check it with anecho "$PATH"
command 2)ifconfig
is obsolete, today we useip
2)dhclient
is not installed on all systems.