How do I gain root privileges?











up vote
8
down vote

favorite
2












How do I gain root privileges in Ubuntu Desktop 12.04? I installed to a USB stick to try it out. Now when I installed it on a VM, I don't have the same options as I did on the USB stick, such as opening remote desktop, installing drivers, and some of the video capabilities.










share|improve this question




















  • 1




    Info from help.ubuntu.com/community/RootSudo "By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user." Instead, use sudo... Example: help.ubuntu.com/community/RootSudo#sudo
    – mondjunge
    Aug 27 '12 at 12:25















up vote
8
down vote

favorite
2












How do I gain root privileges in Ubuntu Desktop 12.04? I installed to a USB stick to try it out. Now when I installed it on a VM, I don't have the same options as I did on the USB stick, such as opening remote desktop, installing drivers, and some of the video capabilities.










share|improve this question




















  • 1




    Info from help.ubuntu.com/community/RootSudo "By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user." Instead, use sudo... Example: help.ubuntu.com/community/RootSudo#sudo
    – mondjunge
    Aug 27 '12 at 12:25













up vote
8
down vote

favorite
2









up vote
8
down vote

favorite
2






2





How do I gain root privileges in Ubuntu Desktop 12.04? I installed to a USB stick to try it out. Now when I installed it on a VM, I don't have the same options as I did on the USB stick, such as opening remote desktop, installing drivers, and some of the video capabilities.










share|improve this question















How do I gain root privileges in Ubuntu Desktop 12.04? I installed to a USB stick to try it out. Now when I installed it on a VM, I don't have the same options as I did on the USB stick, such as opening remote desktop, installing drivers, and some of the video capabilities.







permissions root






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 30 at 16:23









Zanna

49.3k13127236




49.3k13127236










asked Aug 27 '12 at 12:16









Nate Allen

41112




41112








  • 1




    Info from help.ubuntu.com/community/RootSudo "By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user." Instead, use sudo... Example: help.ubuntu.com/community/RootSudo#sudo
    – mondjunge
    Aug 27 '12 at 12:25














  • 1




    Info from help.ubuntu.com/community/RootSudo "By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user." Instead, use sudo... Example: help.ubuntu.com/community/RootSudo#sudo
    – mondjunge
    Aug 27 '12 at 12:25








1




1




Info from help.ubuntu.com/community/RootSudo "By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user." Instead, use sudo... Example: help.ubuntu.com/community/RootSudo#sudo
– mondjunge
Aug 27 '12 at 12:25




Info from help.ubuntu.com/community/RootSudo "By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user." Instead, use sudo... Example: help.ubuntu.com/community/RootSudo#sudo
– mondjunge
Aug 27 '12 at 12:25










2 Answers
2






active

oldest

votes

















up vote
8
down vote













There are 2 ways to do things with elevated permissions.



sudo lets you run commands in your own user account with root privileges.



su lets you switch user so that you're actually logged in as root.
But this options is by default disabled on Ubuntu. Instead you can simply start a root shell with sudo -i.



Read What are the differences between "su", "sudo -s", "sudo -i", "sudo su"? for more information.



Use either method only as and when needed, they can cause your system damage if used without caution.






share|improve this answer























  • sudo -i is the typical way to get a 'rootshell' on an Ubuntu box. It will log everything you do as your original user account, but you're acting as root.
    – Broam
    Nov 5 at 21:15


















up vote
5
down vote













This should make you root after you enter your user's password, assuming you were the first account to be created. Be careful when you're root. Only login as root when you really need to, and logout as soon as you're done.



sudo su -


Alternatively you can run specific commands with root privileges by prepending them with sudo. For example:



sudo cp -p foo bar/





share|improve this answer

















  • 1




    The "Ubuntu" way of getting a root terminal is sudo -i FYI.
    – Broam
    Nov 5 at 21:15











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f180957%2fhow-do-i-gain-root-privileges%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
8
down vote













There are 2 ways to do things with elevated permissions.



sudo lets you run commands in your own user account with root privileges.



su lets you switch user so that you're actually logged in as root.
But this options is by default disabled on Ubuntu. Instead you can simply start a root shell with sudo -i.



Read What are the differences between "su", "sudo -s", "sudo -i", "sudo su"? for more information.



Use either method only as and when needed, they can cause your system damage if used without caution.






share|improve this answer























  • sudo -i is the typical way to get a 'rootshell' on an Ubuntu box. It will log everything you do as your original user account, but you're acting as root.
    – Broam
    Nov 5 at 21:15















up vote
8
down vote













There are 2 ways to do things with elevated permissions.



sudo lets you run commands in your own user account with root privileges.



su lets you switch user so that you're actually logged in as root.
But this options is by default disabled on Ubuntu. Instead you can simply start a root shell with sudo -i.



Read What are the differences between "su", "sudo -s", "sudo -i", "sudo su"? for more information.



Use either method only as and when needed, they can cause your system damage if used without caution.






share|improve this answer























  • sudo -i is the typical way to get a 'rootshell' on an Ubuntu box. It will log everything you do as your original user account, but you're acting as root.
    – Broam
    Nov 5 at 21:15













up vote
8
down vote










up vote
8
down vote









There are 2 ways to do things with elevated permissions.



sudo lets you run commands in your own user account with root privileges.



su lets you switch user so that you're actually logged in as root.
But this options is by default disabled on Ubuntu. Instead you can simply start a root shell with sudo -i.



Read What are the differences between "su", "sudo -s", "sudo -i", "sudo su"? for more information.



Use either method only as and when needed, they can cause your system damage if used without caution.






share|improve this answer














There are 2 ways to do things with elevated permissions.



sudo lets you run commands in your own user account with root privileges.



su lets you switch user so that you're actually logged in as root.
But this options is by default disabled on Ubuntu. Instead you can simply start a root shell with sudo -i.



Read What are the differences between "su", "sudo -s", "sudo -i", "sudo su"? for more information.



Use either method only as and when needed, they can cause your system damage if used without caution.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 30 at 16:22









Zanna

49.3k13127236




49.3k13127236










answered Aug 27 '12 at 12:28









OrangeTux

3,54782352




3,54782352












  • sudo -i is the typical way to get a 'rootshell' on an Ubuntu box. It will log everything you do as your original user account, but you're acting as root.
    – Broam
    Nov 5 at 21:15


















  • sudo -i is the typical way to get a 'rootshell' on an Ubuntu box. It will log everything you do as your original user account, but you're acting as root.
    – Broam
    Nov 5 at 21:15
















sudo -i is the typical way to get a 'rootshell' on an Ubuntu box. It will log everything you do as your original user account, but you're acting as root.
– Broam
Nov 5 at 21:15




sudo -i is the typical way to get a 'rootshell' on an Ubuntu box. It will log everything you do as your original user account, but you're acting as root.
– Broam
Nov 5 at 21:15












up vote
5
down vote













This should make you root after you enter your user's password, assuming you were the first account to be created. Be careful when you're root. Only login as root when you really need to, and logout as soon as you're done.



sudo su -


Alternatively you can run specific commands with root privileges by prepending them with sudo. For example:



sudo cp -p foo bar/





share|improve this answer

















  • 1




    The "Ubuntu" way of getting a root terminal is sudo -i FYI.
    – Broam
    Nov 5 at 21:15















up vote
5
down vote













This should make you root after you enter your user's password, assuming you were the first account to be created. Be careful when you're root. Only login as root when you really need to, and logout as soon as you're done.



sudo su -


Alternatively you can run specific commands with root privileges by prepending them with sudo. For example:



sudo cp -p foo bar/





share|improve this answer

















  • 1




    The "Ubuntu" way of getting a root terminal is sudo -i FYI.
    – Broam
    Nov 5 at 21:15













up vote
5
down vote










up vote
5
down vote









This should make you root after you enter your user's password, assuming you were the first account to be created. Be careful when you're root. Only login as root when you really need to, and logout as soon as you're done.



sudo su -


Alternatively you can run specific commands with root privileges by prepending them with sudo. For example:



sudo cp -p foo bar/





share|improve this answer












This should make you root after you enter your user's password, assuming you were the first account to be created. Be careful when you're root. Only login as root when you really need to, and logout as soon as you're done.



sudo su -


Alternatively you can run specific commands with root privileges by prepending them with sudo. For example:



sudo cp -p foo bar/






share|improve this answer












share|improve this answer



share|improve this answer










answered Aug 27 '12 at 12:32









ajmccluskey

22113




22113








  • 1




    The "Ubuntu" way of getting a root terminal is sudo -i FYI.
    – Broam
    Nov 5 at 21:15














  • 1




    The "Ubuntu" way of getting a root terminal is sudo -i FYI.
    – Broam
    Nov 5 at 21:15








1




1




The "Ubuntu" way of getting a root terminal is sudo -i FYI.
– Broam
Nov 5 at 21:15




The "Ubuntu" way of getting a root terminal is sudo -i FYI.
– Broam
Nov 5 at 21:15


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f180957%2fhow-do-i-gain-root-privileges%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Quarter-circle Tiles

build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

Mont Emei