Jump to content

disable eth0 at boot


SystemCrash86

Recommended Posts

Can someone please tell me how to disable my eth0 interface on boot.

I am using the latest version of Kali Linux 2020-02-17.

I can sudo ifconfig eth0 down and this works no problem. Except i dont want to do this every time and would just like it to be disabled at boot until i need it.

Normally i would add it to the /etc/rc.local file but that does not exist any more.

Link to comment
Share on other sites

  • 2 weeks later...
Quote

Normally i would add it to the /etc/rc.local file but that does not exist any more.

That link sends me to a site that says rc.local is the answer and normally that would be correct.

I googled and searched for days before making this post and rc.local is the very first thing that pops up - However in kali linux this file no longer exists.

Link to comment
Share on other sites

In /etc/NetworkManager/NetworkManager.conf

[main]

plugins=keyfile

[keyfile]
unmanaged-devices=mac:YOUR:MAC:HERE

#To do it by name of the interface

[keyfile]

umanaged-devices=interface-name:ethx

If your machine is using new names for interfaces (eg NOT ethx), you can get it back like so :

Edit /etc/default/grub

GRUB_CMDLINE_LINUX=""

Change to

GRUB_CMDLINE_LINUX"net.ifnames=0 biosdevname=0 "

Run "update-grub" and reboot, your interface names should be wlanx, ethx format.

Remember Kali is based on Debian, so a lot of the tutorials for Debian, works on Kali. A couple of good books to read through.

https://www.kali.org/download-kali-linux-revealed-book/

https://debian-handbook.info/get/now/

For more advanced work, as in customizing Kali, I would recommend reading through the Debian Dev docs 🙂

Have fun 🙂

/Kent

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...