73

I'm currently trying to set up a hyperledger fabric network using docker toolbox, based on the guide HERE

When it comes to "Starting up validating peers" step, I followed and entered ip add into the terminal, but it returns bash: ip: command not found. Any solution? I've tried ifconfig as well and it's the same issue, command not found.

Using Docker Toolbox on Windows 10 Home

Cadoiz
  • 1,446
  • 21
  • 31
ZenX0904
  • 743
  • 1
  • 5
  • 7
  • Can you be a bit more specific about your runtime environment? Is this Docker for Windows (in which case it's virtualizing a real Linux guest), or is it the Windows Subsystem for Linux (in which case it's not)? – Charles Duffy Mar 08 '17 at 18:42
  • 1
    It's not Docker for Windows, which requires Windows 10 Pro that uses HyperV. Mine was installed using Docker Toolbox, the legacy installer using Virtualbox before they moved to HyperV. I entered the command into Docker Quickstart Terminal, which if I'm not mistaken is virtualizing a Linux guest. – ZenX0904 Mar 08 '17 at 18:51
  • That's a linux command, run a `docker-machine ssh` to get to the embedded VM. – BMitch Mar 08 '17 at 20:02
  • That solved the issue. Thanks a lot! – ZenX0904 Mar 09 '17 at 03:12
  • I am also at docker toolbox windows, and as in this question doesn't not seem to be replies regarding the question docker toolbox on windows, but running into embedded VM docker-machine ssh, there is a command IP, but there are not package managers yum and apt, as I seem to miss other packages-not the IP, so I guess, I will have to use Ubuntu windows subsystem, which is as far as I know not available at Home version – FantomX1 May 12 '20 at 00:24

6 Answers6

120

Install ip command package for Ubuntu.

apt update
apt install iproute2
sneaky
  • 439
  • 1
  • 6
  • 18
prosti
  • 42,291
  • 14
  • 186
  • 151
25

I have tried hostname -I. Working fine for me.No need to install a new package.

muhammad shahan
  • 517
  • 6
  • 17
15

Unfortunately, your link has been broken (or it might be inaccessible from Iran). Although there is not enough evidence of which Linux OS you are trying to use, a solution is provided as follow work under .deb (e.g. Ubuntu) and .rpm (e.g. Fedora) package managers.

At first, update the container's repository: Ubuntu:

apt-get update

CentOS:

yum update

Fedora:

dnf update

Secondly, install net-tools package. Ubuntu:

apt-get install net-tools

CentOS:

yum install net-tools

Fedora:

dnf install net-tools

Lately, ifconfig has been replaced with ip command. So make sure to check both commands, some Linux distributions have not changed the command yet.

Esmaeil MIRZAEE
  • 1,110
  • 11
  • 14
  • 4
    Adding to @Esmaeil answer, **yum install net-tools** gets **ifconfig** working. In case you want **ip** command to work as well, you'll need to download iproute package by running **yum install iproute** – nambastha Apr 27 '19 at 11:17
  • and iproute2 for debian – DevTheJo Sep 18 '19 at 08:45
7

for command ip not found in centos 7, you can use yum install iproute -y to fix.

for command ifconfig not found in centos 7, you can use yum install net-tools -y to fix.

SimonSun
  • 71
  • 1
  • 1
3

Although OP was on Windows 10. I landed on this question searching for a fix for macOS and didn't find this answer for a while. So I'm linking it here as well just in case

You can install ip tool on OS X via brew:

brew install iproute2mac
Carolus
  • 477
  • 4
  • 16
0

Your link doesn't work.

Do docker ps or docker images in GitBash to see if the docker containers and images are running.

I recommend installing Docker Community Edition if you are running Win 10. Make sure u have Hyper-V enabled.

Gene
  • 10,819
  • 1
  • 66
  • 58