Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


sudo: command not found
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

sudo: command not found

trying to install something via ssh and i get to the command where i need to install and i get this return

sudo: command not found

what could be the issue? Composer maybe not being installed correctly?

«1

Comments

  • emghemgh Member
    edited June 2023
    1. apt-get install fortune
    2. fortune
    3. apt-get install sudo
  • nick_nick_ Member

    Is it SSH via shared hosting? If so, sudo isn't available. But if it's a VPS, you can switch to the root account and install sudo. The command is variant, depending on the Linux distro you're using.

  • emghemgh Member

    @nick_ said:
    Is it SSH via shared hosting? If so, sudo isn't available. But if it's a VPS, you can switch to the root account and install sudo. The command is variant, depending on the Linux distro you're using.

  • Just install sudo and you're off.

  • emghemgh Member

    @dahartigan said:
    Just install sudo and you're off.

    Booooooring

  • @nick_ said:
    Is it SSH via shared hosting? If so, sudo isn't available. But if it's a VPS, you can switch to the root account and install sudo. The command is variant, depending on the Linux distro you're using.

    dangggg it is ssh via shared hosting. so that will be a problem.

  • @emgh said:

    @dahartigan said:
    Just install sudo and you're off.

    Booooooring

    Okay. Try this: sudo apt install sudo

    Thanked by 3emgh Shazan bdl
  • emghemgh Member

    @dahartigan said:

    @emgh said:

    @dahartigan said:
    Just install sudo and you're off.

    Booooooring

    Okay. Try this: sudo apt install sudo

    Now we’re getting somewhere

    Or

    sudo whereis sudo

  • @emgh said:

    @dahartigan said:

    @emgh said:

    @dahartigan said:
    Just install sudo and you're off.

    Booooooring

    Okay. Try this: sudo apt install sudo

    Now we’re getting somewhere

    Or

    sudo whereis sudo

    sudo which sudo

    Thanked by 1emgh
  • emghemgh Member

    How to reinstall sudo:

    sudo apt-get purge sudo && sudo apt-get install sudo

  • @emgh said:
    How to reinstall sudo:

    sudo apt-get purge sudo && sudo apt-get install sudo

    Sir now it is asking me to send bobs to confirm

    Thanked by 1emgh
  • emghemgh Member
    edited June 2023

    @dahartigan said:

    @emgh said:
    How to reinstall sudo:

    sudo apt-get purge sudo && sudo apt-get install sudo

    Sir now it is asking me to send bobs to confirm

    Do it

    Penus for extra NVMe dick space

    Edit: sudo touch penus && sudo rm boobie (becuz men r cool)

    Thanked by 1dahartigan
  • have you tried restarting your vps?

  • @ItsAsylum said:
    trying to install something via ssh and i get to the command where i need to install and i get this return

    sudo: command not found

    what could be the issue? Composer maybe not being installed correctly?

    You guys do not login via root for everything?

  • Have you met google?

  • raindog308raindog308 Administrator, Veteran

    PLOT TWIST: OP is using OpenBSD and should be using the more secure doas.

    OK, that's probably not it...

    Thanked by 1emg
  • al1r4dal1r4d Member

    @ItsAsylum said:
    trying to install something via ssh and i get to the command where i need to install and i get this return

    sudo: command not found

    what could be the issue? Composer maybe not being installed correctly?

    what is your distro?
    install sudo or doas

  • BetaRacksBetaRacks Member
    edited June 2023

    Maybe you should try su


    If you are in webhosting ssh, you don't need to use sudo

    You can get a compser.phar by doing the following

    php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
    php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
    php composer-setup.php
    php -r "unlink('composer-setup.php');"
    

    Then run php composer.phar install

  • @emgh said:
    How to reinstall sudo:

    sudo apt-get purge sudo && sudo apt-get install sudo

    easier

    sudo apt reinstall sudo

    Thanked by 1emgh
  • just install doas bros

  • emghemgh Member

    @Carlin0 said:

    @emgh said:
    How to reinstall sudo:

    sudo apt-get purge sudo && sudo apt-get install sudo

    easier

    sudo apt reinstall sudo

    Think about it

    Thanked by 1Carlin0
  • kasodkkasodk Barred
    edited June 2023

    @ItsAsylum said:

    @nick_ said:
    Is it SSH via shared hosting? If so, sudo isn't available. But if it's a VPS, you can switch to the root account and install sudo. The command is variant, depending on the Linux distro you're using.

    dangggg it is ssh via shared hosting. so that will be a problem.

    Nah, that's not a problem. Ask support for the root password, use the su command, install sudo, and add your user to the sudo group.

    Thanked by 1emgh
  • emghemgh Member

    @kasodk said:

    @ItsAsylum said:

    @nick_ said:
    Is it SSH via shared hosting? If so, sudo isn't available. But if it's a VPS, you can switch to the root account and install sudo. The command is variant, depending on the Linux distro you're using.

    dangggg it is ssh via shared hosting. so that will be a problem.

    Nah, that's not a problem. Ask support for the root password, use the su command, install sudo, and add your user to the sudo group.

    Also ask for custom iso

  • FatGrizzlyFatGrizzly Member, Host Rep

    @kasodk said:

    @ItsAsylum said:

    @nick_ said:
    Is it SSH via shared hosting? If so, sudo isn't available. But if it's a VPS, you can switch to the root account and install sudo. The command is variant, depending on the Linux distro you're using.

    dangggg it is ssh via shared hosting. so that will be a problem.

    Nah, that's not a problem. Ask support for the root password, use the su command, install sudo, and add your user to the sudo group.

    It's probably cloudlinux, so wheel group

  • su - && apt install sudo -y && usermod -aG sudo $user

  • NeoonNeoon Community Contributor, Veteran
    edited June 2023

    @Carlin0 said:

    @emgh said:
    How to reinstall sudo:

    sudo apt-get purge sudo && sudo apt-get install sudo

    easier

    sudo apt reinstall sudo

    Thanked by 1Carlin0
  • emghemgh Member

    And this is why I love LET

  • @Neoon said:

    @Carlin0 said:

    @emgh said:
    How to reinstall sudo:

    sudo apt-get purge sudo && sudo apt-get install sudo

    easier

    sudo apt reinstall sudo

    Is a similar command to:

    man man

    :D

  • emgemg Veteran

    @plumberg said:

    You guys do not login via root for everything?

    Never. I leave root disabled and have been doing it for a very long time. I use sudo. For system management and configuration, I run sudo from an admin account and avoid the root account after that. The admin account is used only for system maintenance and management. Remote SSH and the regular personal work gets done from separate unprivileged accounts. I rarely find a Linux distro where sudo is not installed by default, but it happens. Use apt or dnf or yum or pacman or whatever to install sudo.

    Some systems force you to have a root account, such as OpenVZ VPSs. For those systems, I give the root account a long strong password, create an admin account for managing the system and unprivileged accounts for SSH and regular unprivileged work. After that I use the admin account with sudo for "root" activities, block the unprivileged SSH and working accounts from sudo. I disable the root account for SSH and regular screen logins and do not use root directly again, not if I can help it.

    In fairness to others and to admit my true laziness, my fingers remember and type the command "sudo su -" all too easily. In essence, I am logging in as root from the admin account anyway. It would be better if I could acquire the habit of prefixing each command with "sudo" as intended, but at least the root account is safer.

    This is considered good traditional security practice, but some security experts believe that it makes little real difference. I will not argue with them, but now you know what I do and can decide if the extra effort is worth the perceived benefits.

    Thanked by 2plumberg emgh
  • emghemgh Member

    @emg said: This is considered good traditional security practice, but some security experts believe that it makes little real difference. I will not argue with them, but now you know what I do and can decide if the extra effort is worth the perceived benefits.

    I just turn on every security thing in sshd_config, disable root password, and use root with my ssh key

    I'm way too lazy for sudo su

    Thanked by 1emg
Sign In or Register to comment.