{"id":20053,"date":"2023-07-31T08:46:07","date_gmt":"2023-07-31T08:46:07","guid":{"rendered":"https:\/\/linuxways.net\/?p=20053"},"modified":"2023-07-31T08:46:07","modified_gmt":"2023-07-31T08:46:07","slug":"how-to-install-ifconfig-on-debian-12","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/debian\/how-to-install-ifconfig-on-debian-12\/","title":{"rendered":"How to Install ifconfig on Debian 12"},"content":{"rendered":"<p>In Debian 12 Bookworm, the traditional ifconfig command is replaced by the ip command from the iproute2 package. The ip command provides more powerful and flexible networking tools compared to ifconfig.<\/p>\n<p>&#8220;ifconfig&#8221; remains a useful command for basic network management tasks, advanced users and administrators often prefer using the &#8220;ip&#8221; command from the iproute2 package due to its more extensive functionality and enhanced features. Nevertheless, &#8220;ifconfig&#8221; continues to be a widely used tool for network interface management on Linux systems.<\/p>\n<p>To use ifconfig in Debian 12, you can install the net-tools package, which includes the ifconfig command. However, it&#8217;s recommended to use the modern ip command for networking tasks. But we will see how we can install and fix ifconfig in our Debian 12..<\/p>\n<h2><strong>Advantages of ifconfig<\/strong><\/h2>\n<p><strong>Network Interface Configuration:<\/strong> ifconfig provides a straightforward way to configure and manage network interfaces, including setting IP addresses, netmasks, and enabling or disabling interfaces.<\/p>\n<p><strong>Quick Network Information:<\/strong> It offers a quick overview of the current network settings and statistics for all active network interfaces, helping users troubleshoot and diagnose network-related issues.<\/p>\n<p><strong>Legacy Support:<\/strong> Although newer tools like &#8220;ip&#8221; have become more popular for network management, ifconfig is still available and widely used, ensuring compatibility with older systems and scripts.<\/p>\n<p><strong>Simple and Familiar Syntax:<\/strong> ifconfig&#8217;s command syntax is relatively straightforward, making it easy for both beginners and experienced users to work with network settings effectively.<\/p>\n<p><strong>On-the-Fly Configuration:<\/strong> Users can use ifconfig to change network settings on the fly, allowing for real-time adjustments and network optimizations without requiring a system restart.<\/p>\n<p>We might encounter an error when running and using the ifconfig command. This is mostly because of missing the ifconfig in our Linux distribution.<\/p>\n<h3><strong>Check ifconfig Availability<\/strong><\/h3>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">ifconfig<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"552\" class=\"wp-image-20054\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-1.png 738w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-1-300x224.png 300w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/p>\n<p>As we have talked about above, this command has been replaced with <strong>ip<\/strong> command. We can also use the <strong>ip addr<\/strong> command like the following.<\/p>\n<h3><strong>Use ip addr<\/strong><\/h3>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">ip addr<\/span><\/div><\/div>\n<p>Now the question is how we can fix this <strong>ifconfig: command not found<\/strong> issue? We have several ways that we can practice.<\/p>\n<p>If we install net-tools in our Debian 12, this issue will be removed from our Debian12.<\/p>\n<h2><strong>Install net-tools for ifconfig Command<\/strong><\/h2>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">sudo<\/span> apt <span class=\"kw2\">install<\/span> net-tools <span class=\"re5\">-y<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"726\" height=\"125\" class=\"wp-image-20055\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-2.png 726w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-2-300x52.png 300w\" sizes=\"auto, (max-width: 726px) 100vw, 726px\" \/><\/p>\n<p>Let\u2019s use the ifconfig command once again<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">ifconfig<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"738\" height=\"552\" class=\"wp-image-20056\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-3.png 738w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-3-300x224.png 300w\" sizes=\"auto, (max-width: 738px) 100vw, 738px\" \/><\/p>\n<p>There is a high likelihood that we may encounter the same error again. It is because we have to use the complete path of our ifconfig command to use it. The \/sbin\/ifconfig is the path of the ifconfig command. So we need to call it in Debian 12 to use ifconfig here.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"sy0\">\/<\/span>sbin<span class=\"sy0\">\/<\/span><span class=\"kw2\">ifconfig<\/span><\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"734\" height=\"545\" class=\"wp-image-20057\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-4.png 734w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-4-300x223.png 300w\" sizes=\"auto, (max-width: 734px) 100vw, 734px\" \/><\/p>\n<p>Here we can successfully use the ifconfig command. So if we face a similar or same error from the ifconfig command, we can follow the solution above-mentioned.<\/p>\n<h2><strong>Uninstall ifconfig<\/strong><\/h2>\n<p>It is never a good idea to uninstall ifconfig from Debian 12 or from any Linux distribution. But still, if you want to uninstall it, it can be done with the following command.<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">apt-get remove<\/span> net-tools<\/div><\/div>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"546\" class=\"wp-image-20058\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-5.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-5.png 731w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-5-300x224.png 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p>To remove all the remaining packages automatically, we have a command as<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"width:100%;\"><div class=\"bash codecolorer\"><span class=\"co4\">$ <\/span><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">apt-get autoremove<\/span><\/div><\/div>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"731\" height=\"547\" class=\"wp-image-20059\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-6.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-6.png 731w, https:\/\/linuxways.net\/wp-content\/uploads\/2023\/07\/word-image-20053-6-300x224.png 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/strong><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>The ifconfig command in Debian 12 has been replaced with <strong>ip<\/strong> and <strong>ip addr<\/strong> commands. Even in other Linux distributions in which the ifconfig command is available and supported, we might see the error related to ifconfig commands. To solve this issue we have a way around as we discussed above in the article.<\/p>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>The ifconfig is a command line-based utility that gets used to configure the kernel-resident network interfaces. It is also used to start different interfaces.<\/p>","protected":false},"author":110,"featured_media":20060,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-20053","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-debian"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/20053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=20053"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/20053\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/20060"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=20053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=20053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=20053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}