To enable non-root users to execute and manage Docker without using sudo, you can add them to the Docker group. Follow these steps:

### Step 1: Verify the Existence of the Docker Group

First, ensure that the Docker group already exists on your system. If it doesn't, you can create it using the following command:
sudo groupadd docker

### Step 2: Add the User to the Docker Group

To add a non-root user to the Docker group, you can use the following command:
sudo usermod -aG docker username
groupname: docker
username: the username you want to add to the group

The -aG option appends the user to the specified group.

### Step 3: Re-login or Reboot the System

To apply the group membership change, the user needs to re-login or reboot their system. You can re-login by logging out and back in or reboot the system using the following command:
sudo reboot

### Step 4: Verify Group Membership

After re-login or reboot, verify that the user has been successfully added to the Docker group by running the following command:
groups username
groupname: docker

You should see the Docker group in the output.

### Step 5: Test Docker Commands

Try running a Docker command, such as:
docker version
If the command executes successfully without prompting for sudo, the user should now be able to execute Docker commands without needing sudo.

### Important Notes

- **Security**: Adding a user to the Docker group grants them the same level of permissions as the root user, as Docker runs as root. Ensure you trust the user, as this may introduce security risks.
- **Multi-User Environment**: In a multi-user environment, ensure that all users who need to use Docker are added to the Docker group.

### Troubleshooting

If you encounter a permission denied error when trying to connect to the Docker daemon socket, verify that the user has been added to the Docker group and that Docker is running.
The default Docker daemon socket path is `/var/run/docker.sock`. You can verify this by running the command `docker -H unix:///var/run/docker.sock version` and checking the Docker version.