LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-05-2023, 04:47 AM   #1
Jason.nix
Member
 
Registered: Feb 2023
Posts: 567

Rep: Reputation: 10
Post Some questions about interfaces and interfaces.d


Hello,
I have some questions about network settings:

1- How can I rename a NIC name?

2- What is the difference between interfaces and interfaces.d?

3- If I open the interfaces file and put the new NIC settings in it or create a new file under the interfaces.d directory and then put the new NIC settings in it, then which one is better?


Thank you.
 
Old 09-05-2023, 04:54 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,646
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
When I started using Linux, most configuration was done using large single files in the /etc directory. Nowadays there is usually a subdirectory of the same name (suffixed with .d) into which you place a number of small files. Programs that read such data will look in both places, but I think that the old single files are increasingly not used any more. They exist only to provide backward compatibility.
 
Old 09-05-2023, 05:21 AM   #3
Jason.nix
Member
 
Registered: Feb 2023
Posts: 567

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by hazel View Post
When I started using Linux, most configuration was done using large single files in the /etc directory. Nowadays there is usually a subdirectory of the same name (suffixed with .d) into which you place a number of small files. Programs that read such data will look in both places, but I think that the old single files are increasingly not used any more. They exist only to provide backward compatibility.
Hello,
Thank you so much for your reply.
If that's what you say, then why the last version the Debian doesn't create any files in the interfaces.d directory? It uses the interfaces file.
 
Old 09-05-2023, 05:59 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,976

Rep: Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336Reputation: 7336
Quote:
Originally Posted by Jason.nix View Post
Hello,
Thank you so much for your reply.
If that's what you say, then why the last version the Debian doesn't create any files in the interfaces.d directory? It uses the interfaces file.
because it is how is it implemented. By default that is enough. If you wish you can modify it.
But anyway both the file and the dir is in use (if there is something in it).
It is a common practice, you can find similar solution for apt and for other tools too.
 
Old 09-05-2023, 06:06 AM   #5
Jason.nix
Member
 
Registered: Feb 2023
Posts: 567

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by pan64 View Post
because it is how is it implemented. By default that is enough. If you wish you can modify it.
But anyway both the file and the dir is in use (if there is something in it).
It is a common practice, you can find similar solution for apt and for other tools too.
Hello,
Thank you so much for your reply.
So, Can I use which one I like?
How to rename a NIC?
 
Old 09-06-2023, 11:14 AM   #6
Michael Uplawski
Senior Member
 
Registered: Dec 2015
Posts: 1,622
Blog Entries: 40

Rep: Reputation: Disabled
I wonder if chat-bots are active on LQ.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables multiple interfaces same subnet to multiple vlan interfaces krobinson Linux - Server 3 04-22-2015 04:25 AM
3 network interfaces - only works from boot with two interfaces enabled linux_driver Linux - Networking 4 11-26-2014 05:42 PM
ifup: couldn't read interfaces file "/etc/network/interfaces" dobharweim Linux - Networking 1 12-13-2013 11:20 AM
[SOLVED] /etc/network/interfaces configuration for virtual interfaces nonshatter Linux - Networking 4 10-25-2010 06:22 AM
ifup: couldn't read interfaces file "/etc/network/interfaces" debian lenny lorimer73 Linux - Networking 1 08-24-2010 03:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration