00 Votes

Linux/Ubuntu: Run Terminal Command as Root

Question by Guest | Last update on 2022-11-19 | Created on 2014-01-21

It is not long ago that I have tried my Linux computer with Ubuntu system for the first time. That is why, I am just at the point of knowledge that I am happy that I already can open the command prompt or Terminal of Linux at all.

Unfortunately, entering a command which I have found on the Internet failed with the error message "only root can do that". So, obviously, you have to sign in as root to go on here.

Can someone tell me, how to do that or how I can run this root-command in any other way?

ReplyPositiveNegative
0Best Answer0 Votes

You should not be signed in as root permanently. It is better to perform only individual compounds temporarily with administrator rights.

For this, it is sufficient to prepend your desired command with "sudo".

sudo mv /file.txt ~/file.txt

So, just write "sudo" into the Terminal and after that the command you would like to execute. You will then need to enter your password. If your password is correct, the command is executed.
Last update on 2022-11-19 | Created on 2014-01-23

ReplyPositive Negative
Reply

Related Topics

VirtualBox: Change Date and Time

Tutorial | 10 Comments

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.