Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

More accurately, how do I tell Ubuntu to obtain an address using DHCP for all the network interfaces it finds (which do not require a password)?

share|improve this question
    
This may interest you. (Perhaps someone can write an answer with more detail about that, or add it to an existing answer.) –  Eliah Kagan May 26 '12 at 5:18
    
@EliahKagan: Thanks, that's a useful link. :) –  Mehrdad May 26 '12 at 5:24

1 Answer 1

ifconfig -a

lists all the network interfaces, so you can run

ifconfig -a | grep --only-matching -i "^\w\+" | xargs -l1 sudo dhclient

whenever you want to connect to a network.

If you would like it to happen when you log in, simply append it to the file ~/.bashrc (for you only) or /etc/bash.bashrc (globally).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.