Once you're running Ubuntu on Windows, you can follow the steps detailed at Install on Ubuntu/Debian to install recent stable versions of Redis from the official APT repository. Follow these instructions, and take note of the default Linux distribution it installs. sudo bash & sudo sh: Anything after the sudo is a program to run - so in these cases you are asking to run a couple of shells - bash and dash. The su command stands for 'substitute user', and allows you to become different user (super user). If you drop the 'userid' it assumes you are trying to login as root - which you can't (unless you change the root password). These options are documented under man sudo. Normally you would use the format su - to login as the user.Running sudo -i is a cleaner (in my opinion) way of running sudo su. Running su as root is essentially a no-op, though it probably starts a new shell. sudo runs the specified command ( su) as root. su root (which can be shortened to just su) runs the su command as the user who invoked it. The -u user option means to run the command as the specified user rather than root. There's a subtle difference between the two. The -s option means to run the shell specified in the environment variable SHELL if this has been set, or else the users login shell. Microsoft provides detailed instructions for installing WSL. sudo -su user is short for sudo -s -u user. For this method to work, you'll need to be running Windows 10 version 2004 and higher or Windows 11. You can try using sudo sudo-V less as a regular user or just sudo -V. WSL2 lets you run Linux binaries natively on Windows. You are running as a regular user and need to sudo several commands at once. If username is not specified with su and su -, the root account is implied. It allows user who have permissions to execute a command as the superuser or another user, as specified in the sudoers file. sudo su changes the current user to root but environment settings (PATH) would remain same. To install Redis on Windows, you'll first need to enable WSL2 (Windows Subsystem for Linux). sudo su - This time it is a login shell, so /etc/profile. The main difference is : su - username sets up the shell environment as if it were a clean login as the specified user, it access and use specified users environment variables, su username just starts a shell with current environment settings for the specified user. The su command stands for 'substitute user', and allows you to become different user (super user). However, you can install Redis on Windows for development by following the instructions below. Redis is not officially supported on Windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |