"Command not found" on my server? “bash: sudo: command not found”?
I'm trying to get my server setup so that I can deploy my first rails app, but when I log into my server via SSH on the command line and try to run this command:
Code:
milesros@serv01 [~]# sudo adduser myappuser Code:
-bash: sudo: command not found Code:
milesros@serv01 [~]# adduser myappuser Code:
-bash: adduser: command not found I was able to run the command Code:
compgen -c The commands seem to work just fine when I'm entering commands on my local machine, but as soon as I log into the server, I keep getting 'command not found' errors. I'm running Ubuntu 14.04, and my hosting is with SiteGround (their servers run linux CentOS) Also, if it helps I have been following this tutorial on deploying a rails app by Phusion Passenger up to this point https://www.phusionpassenger.com/lib...eploy_app.html Any tips or advice would greatly appreciated, I've been at this for hours :( |
What you are running locally does not matter. Only the server OS and configuration matter.
What type of hosting account do you have? Shared, dedicated server, VPS? Do you have root access? Etc., etc... Have you checked the provider documentation? |
I have a shared hosting account with SiteGround, but since it's a shared hosting plan, I don't have ssh root access to the server. I have gone through the Phusion Passenger documentation, but haven't found a solution yet. Actually, the tutorial that I've been following up to this point is actually part of Phusion's documentation.
|
Quote:
|
^ and i fear that is all there is to it.
but for the sake of completeness: - you don't need sudo. try 'su' instead (just 'su', not adding any command after that. it should ask for your root password, which is not the same as your user password) - the '#' prompt kinda implies that you are root already. enter "whoami" to see who you are. - CentOS does not use apt-get, because apt-get is debian specific. |
Trust us, Shared Hosting accounts do not get "root".
Contact Siteground support. |
I feel I should also pint out that "apt-get" is a Debian program and won't work under CentOS which would use YUM or, at some point, DNF.
It might be as well to read up on Linux distributions if you're going to be spending money on running one. |
If you are running Debian or Ubuntu and would like to run any command with the Sudo and got an error '-bash: Sudo: command not found' , you probably have no sudo pre installed. To solve the issue create a superuser and enter the 'su' command in shell script. Then you enter the password of the root and continue running the command but with root privileges: 'apt-get install Sudo'
Everything should work upon completion. IMPORTANT: For the current user to execute commands with root privileges using Sudo he/she must be a member of the corresponding group. To add a user to the sudo group, run the following command: 'usermod -a -G sudo user*' *('user' is an actual user name) More on such specifics can be found here |
All times are GMT -5. The time now is 04:19 AM. |