linux commands
hi, is there any way to use linux commands like sudo
in the repl shell? Thanks!
Press Ctrl-shift-s.
Sadly, you can't use sudo, su or doas, but you can install packages, at least:
install-pkg package_name
Sudo doesn't work since repl obviously won't give you root perms. Install linux if that's what you want. If you want to install packages then use install-pkg
instead of apt-get
.
I think it exists. IF you go to the shell in your repl, you can work the commands there.
Sudo does not work, su exists but always doesn’t work. The repl user that is always run is runner. That’s why the home directory always shows as /home/runner. EDIT:
apt commands don’t work either. Every repl runs Linux, and there is a command called run-project which runs da repl. And there is environment variables for the repl like REPL_SLUG. List of all of them is shown but running command env. rpm command don’t work and path to python3 virtual environments is /opt/virtualenvs/
If you have explorer turned on then you should be able to see a shell tab next to you console on python repls, or you can make a bash repl
They should work, because Repl.it is Linux based and not Windows/Mac based, if they dont work then I would recommend installing the Linux terminal
@Squirrel777 ah ok
i am pretty sure u can. repl is based on ubuntu so linux commands should work
@EpicGamer007 thing is, when i do sudo apt install
it says bash: sudo: no command found
.
@adl212 I dont think sudo would work on repl. it seems to have something to do with managing users, permissions, etc. i dont think that is possible on replit. Most bash commands work tho
@EpicGamer007 would other linux commands work tho?
@adl212 yes. as long as it is not something that may provide a security issue or break repl, it should work. the console and bash shell enables you to write linux commands
@EpicGamer007 yeah well rm -r /home/runner command removes the repl home directory which causes a lot of chaos
@EpicGamer007 sorry for nitpicking--
Repl is not based on Ubuntu, it uses Ubuntu docker containers, with a tunnel, if it was based on Ubuntu it'd be a distro
@EpicGamer007 pretty much me right there:
Duty Calls
@CodeLongAndPros LMAO yes
@EpicGamer007 relatable
mv