I am creating a Linux environment for learning purpose. I just installed ubuntu for base OS, and I installed centos(minimal) in Virtual box.

My goal is to access the centos from ubuntu by Putty.

But in Cent OS, I'm not able to configure ip and hostname.

While trying on centos #ifconfig it is telling command not found.

Please help me to resolve this one. Thanks in advance

  • may be ifconfig command is not in your path. Try /sbin/ifconfig. – iamauser Dec 29 '15 at 18:29
  • What CentOS version are you using ? – Digisec Dec 29 '15 at 18:31
  • @Digisec CentOS 7 – ARUN Dec 29 '15 at 18:34
  • @iamauser on that location i can find ifcfg only – ARUN Dec 29 '15 at 18:35
  • @ARUN, see my answer – iamauser Dec 29 '15 at 18:41

If you have a minimal CentOS-7, ifconfig is not available. It has been replaced with ip commands. Package net-tools that provides ifconfig can be installed separately using yum on CentOS-7.

yum install net-tools

# execute ifconfig

As of CentOS 7 there is no more ifconfig. They replaced it with iproute2. The following link has comparison examples.

For further information on how to set permanent configuration for your network please check this link for examples.

Furthermore, they replaced sysvinit with systemd.

Finally, I would like to finish with a question. Why the need to run a windows application, like putty, on top of Linux to ssh when you can simply ssh from a terminal ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.