User Account Commands
Begin by checking your current username with the following command:su command. For instance, to switch to user Aparna, execute:
aparna@hostname).
Sudo Privileges
Linux systems include a superuser (root) with unrestricted access; however, for security reasons, production and enterprise environments typically restrict direct root access. Instead, a regular user with sudo privileges can perform administrative tasks such as installing software or accessing restricted directories.
When attempting to access files that require higher privileges, running a command as a regular user will result in an error. For example:
sudo, a user with administrative rights can execute it successfully:
Always use
sudo when executing administrative commands to avoid permission issues.Downloading Files from the Internet
There are numerous instances where you may need to download files such as RPM packages, binaries, or images from the internet. You can use thecurl command, which downloads content from a specified URL. The -O option saves the output directly to a file:
wget command by providing the complete URL of the file.
Checking Your Operating System
If you’re uncertain about which Linux distribution you are using, you can inspect release files in the/etc directory. Since the filenames vary by distribution, using a wildcard is often helpful. To list all release files, run:
cat command:
This concludes our overview of additional Linux commands. With regular practice, these commands will become a seamless part of your Linux CLI toolkit for system navigation and administration.