Sam Chapman .Dev | Personal Development Blog

Miscellaneous Linux Tips

This page is for tips and tricks that don't really fit anywhere else.

Installing from .deb

To install a package from a .deb file enter the following command:

dpkg -i <file_name>.deb

Sudo

By default the sudo command will run commands following as the root user. You are able to change which user you run commands as using the following command:

sudo -U pseudo cat secret.txt
  • -U pseudo - This is how you select the user who's permissions you want to use. In this case we are using the pseudo user's permissions.
  • cat secret.txt - This is the command you are running.

su

su is a command allowing you to switch user.

su - pseudo

The above will change you to the pseudo user.