- Newest
- Most votes
- Most comments
The "service" command may not be in the path.
So, try the following settings in "~/.bash_profile".
export PATH=$PATH:/sbin
After putting in the settings, execute the following command to reflect the settings.
source ~/.bash_profile
Or, try the "service" command, specifying the path.
sudo /sbin/service docker start
Hi, thanks for the above guidance. Yes, I did update the ./bash_profile. Also, after updating it - I did type this --> source ~/.bash_profile as well before the following command below:
sudo /sbin/service docker start sudo: /sbin/service: command not found
and this one
sudo service docker start sudo: service: command not foundWhat is the OS of the EC2 AMI you used?
Sorry, it may be "/usr/sbin" instead of "/sbin". Change all of the above steps to the path "/usr/sbin" and try again.
export PATH=$PATH:/usr/sbin
sudo /usr/sbin/service docker start
@Riku, to answer your question: What is the OS of the EC2 AMI you used? --> Amazon Linux Change all of the above steps to the path "/usr/sbin" and try again. --> Done.
The Result:
source ~/.bash_profile [cloudshell-user@ip-10-4-189-71 ~]$ sudo /usr/sbin/service docker start sudo: /usr/sbin/service: command not found [cloudshell-user@ip-10-4-189-71 ~]$ export PATH=$PATH:/usr/sbin [cloudshell-user@ip-10-4-189-71 ~]$ sudo /usr/sbin/service docker start sudo: /usr/sbin/service: command not found
It appears from your response that you are using CloudShell, but CloudShell cannot launch Docker. https://docs.aws.amazon.com/cloudshell/latest/userguide/vm-specs.html
Currently, the AWS CloudShell compute environment doesn't support Docker containers.
You are most likely not executing commands on EC2.
Relevant content
- Accepted Answerasked a year ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated a year ago
"Step 4" of what? Please provide a link to the instructions.
@kentrad, sorry is this one --> https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/get-started-create-client.html
kentrad, is this link --> https://docs.aws.amazon.com/managed-blockchain/latest/hyperledger-fabric-dev/get-started-create-client.html