If you are on a Ubuntu Linux distribution system and want to login as root user, then the first thing you should know is "the root user is disabled by default in Ubuntu for security reason" - Read the official page: https://help.ubuntu.com/community/RootSudo
So the su - command will not work.
But, If you are a part of the sudoer group (sudo) then you can make use of the sudo command to perform administrative tasks with elevated privileges.
Examples:
# sudo apt install python3
[sudo] password for mike:
Reading package lists... Done
...
# sudo nano /etc/nginx/nginx.conf
Facing issues? Have Questions? Post them here! I am happy to answer!
Author Info:
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
More Posts related to Ubuntu,
- Fix - sudo: systemctl: command not found
- How to know the version of Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- How to install Apache Maven on Ubuntu
- Steps to Kill a Running Process in Ubuntu Linux
- How to know current Ubuntu Linux version via terminal command
- How to stop/start/restart apache server using command [Ubuntu]
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
- Ubuntu: How to search for a package to install using apt in Terminal
- Fix: E: Command line option --installed is not understood in combination with the other options
- How to install Python on Ubuntu
- Ubuntu Linux: How to Login as root User
- Access Windows share folder in Ubuntu Device in Network
- Add a User as a Sudoer Using Ubuntu Linux Command Line Terminal
- Install Oh My Zsh on Ubuntu Docker complete steps
- Fix: Make makefile:31 Error 127 (GCC)
- [fix] openssl No such file or directory error C++
- How to install zsh shell on Ubuntu
- Install Golang (Go) on Ubuntu
- Ubuntu Linux: Unzip a zip file using Terminal
- Where are Environment Variables stored in Ubuntu
- apt-get list --installed packages in Ubuntu Linux
- Ubuntu: List all Installed Packages using apt
- Quick steps to install Nginx on Ubuntu Linux
- How to kill service running on a port on Ubuntu Linux
More Posts:
- Installing Microsoft Edge on M1/M2 Mac - Microsoft
- Copy Text to Android Clipboard Programmatically ClipboardManager - Android
- How to change default macOS Terminal Window size - MacOS
- How to know the Model Number & Part Number of your iPhone - iOS
- Create a Gradle Java Project in VS Code - Gradle
- How to create Gradle Multi-Project in IntelliJ - Gradle
- How to change the Default Port 8888 of Jupyter Notebook Server - Python
- PowerShell - How to use Try Catch Finally blocks for error exception handling (Windows/SharePoint) - SharePoint