Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello guys I wanted to get the ip from the server with ifconfig command, but for some reason I don`t have it, when I type ifconfig on the terminal it says Command not found. I looked for the ifconfig source code in the web to compile it with gcc, but I didn`t find it, can anyone please give the c source code or tell where I can get it. Thanks in advance.
Did you do (typing "ifconfig") as a root? If not, then do i as a UID 0 (I mean root). Usually ifconfig is in /sbin directory. And if you type /sbin/ifconfig as a normal user, then it should work...
You can check your ip address (and more), by ip program (but to do it, you must be root). In root mode try to write; ip a show
Did you do (typing "ifconfig") as a root? If not, then do i as a UID 0 (I mean root). Usually ifconfig is in /sbin directory. And if you type /sbin/ifconfig as a normal user, then it should work...
You can check your ip address (and more), by ip program (but to do it, you must be root). In root mode try to write; ip a show
Like you say, the ifconfig command is in /sbin/ifconfig. The problem is that I canīt log on as root on the server, and I donīt have permissions of any kind in that binary. Itīs permissions are:
-rwxr-x--- 1 root root
I have to make a script which outputs several host attributes, but I canīt test it in the server because I donīt have access to that binary.
And since I canīt log on as root, I figured out that the only way of getting that command was by compiling the ifconfig source code, ( like I did with other commands before, such like banner and md5 )but Iīm not sure if that will work because the sources I compiled before only do string operations. Thanks
Last edited by DeepSeaNautilus; 08-11-2008 at 09:55 PM.
Hello guys, I found this link that may be helpful for finding the ifconfig source code. I haven`t verified it yet though. http://mingzuos.blogspot.com/
Last edited by DeepSeaNautilus; 08-13-2008 at 12:51 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.