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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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