Network setup

Tom H tomh0665 at gmail.com
Thu Jan 14 11:47:25 UTC 2016


On Tue, Jan 5, 2016 at 12:09 AM, W Scott Lockwood III
<vladinator at gmail.com> wrote:
> On Mon, Jan 4, 2016 at 5:02 PM, Thiago Farina <tfransosi at gmail.com> wrote:
>>
>> On Mac OS X [1] one can do the following to set a static ip for a
>> network device:
>>
>> $ sudo networksetup -setmanual Ethernet [ipaddress] [subnet] [router]
>>
>> On Ubuntu (I'm on 12.04) you have to disable dnsmasq on NetworkManager
>> (and this can break your dns resolution in the process), edit
>> /etc/network/interfaces, restart the network-manager service and hope
>> for the best. And in the end you give up the command line and end up
>> doing this through the UI.
>>
>> Why does Ubuntu not invest in making an administration tool like
>> networksetup for its users?
>>
>> [1] - https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/networksetup.8.html
>
> Have you looked at ifconfig?

Please don't.

1) "ip" is the tool to use for manual NIC configuration; "ifconfig"
has been deprecated for a while.

2) Disable ifupdown and NM before using "ip" if you really want to
manage a NIC manually; or disable ifupdown or NM for that NIC that you
want to manage manually.

If you're using NM, "nmcli" is the Linux equivalent of "networksetup"
but its options are more convoluted.



More information about the ubuntu-users mailing list