How to use sudo with the -i option?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am following some tutorial to install Ubuntu with full disk encryption. In it, I am asked to boot the installation media into the live session and perform some operations before installing the distro on my laptop. Some of these operations require a root terminal; alternatively the guide tells me to use sudo -i. However it does not tell me exactly how to use it. For example, in one part says:
You'll want a root terminal for this or use
sudo -i.
openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero > /dev/sdxy
I tried reading the man page forsudobut apparently you can use sudo -i with and without a command so I am a bit confused. Specifically I would like to ask:
How to use sudo -i in this setting? Please remember that I will be working in a live session.
Also, any explanation of how the option works is very welcome, but try to keep it as simple as possible since I am a very basic user.
ubuntu sudo livecd
add a comment |Â
up vote
0
down vote
favorite
I am following some tutorial to install Ubuntu with full disk encryption. In it, I am asked to boot the installation media into the live session and perform some operations before installing the distro on my laptop. Some of these operations require a root terminal; alternatively the guide tells me to use sudo -i. However it does not tell me exactly how to use it. For example, in one part says:
You'll want a root terminal for this or use
sudo -i.
openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero > /dev/sdxy
I tried reading the man page forsudobut apparently you can use sudo -i with and without a command so I am a bit confused. Specifically I would like to ask:
How to use sudo -i in this setting? Please remember that I will be working in a live session.
Also, any explanation of how the option works is very welcome, but try to keep it as simple as possible since I am a very basic user.
ubuntu sudo livecd
Why don't you just click on the "encryption" tickbox in the installer? As for your question, you'd better just usesudo -ialone, then you have a root shell you can enter theopensslcommand.
â cylgalad
Sep 15 '16 at 8:10
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am following some tutorial to install Ubuntu with full disk encryption. In it, I am asked to boot the installation media into the live session and perform some operations before installing the distro on my laptop. Some of these operations require a root terminal; alternatively the guide tells me to use sudo -i. However it does not tell me exactly how to use it. For example, in one part says:
You'll want a root terminal for this or use
sudo -i.
openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero > /dev/sdxy
I tried reading the man page forsudobut apparently you can use sudo -i with and without a command so I am a bit confused. Specifically I would like to ask:
How to use sudo -i in this setting? Please remember that I will be working in a live session.
Also, any explanation of how the option works is very welcome, but try to keep it as simple as possible since I am a very basic user.
ubuntu sudo livecd
I am following some tutorial to install Ubuntu with full disk encryption. In it, I am asked to boot the installation media into the live session and perform some operations before installing the distro on my laptop. Some of these operations require a root terminal; alternatively the guide tells me to use sudo -i. However it does not tell me exactly how to use it. For example, in one part says:
You'll want a root terminal for this or use
sudo -i.
openssl enc -aes-256-ctr -pass pass:"$(dd if=/dev/urandom bs=128 count=1 2>/dev/null | base64)" -nosalt < /dev/zero > /dev/sdxy
I tried reading the man page forsudobut apparently you can use sudo -i with and without a command so I am a bit confused. Specifically I would like to ask:
How to use sudo -i in this setting? Please remember that I will be working in a live session.
Also, any explanation of how the option works is very welcome, but try to keep it as simple as possible since I am a very basic user.
ubuntu sudo livecd
ubuntu sudo livecd
asked Sep 15 '16 at 2:54
Garynall96
113
113
Why don't you just click on the "encryption" tickbox in the installer? As for your question, you'd better just usesudo -ialone, then you have a root shell you can enter theopensslcommand.
â cylgalad
Sep 15 '16 at 8:10
add a comment |Â
Why don't you just click on the "encryption" tickbox in the installer? As for your question, you'd better just usesudo -ialone, then you have a root shell you can enter theopensslcommand.
â cylgalad
Sep 15 '16 at 8:10
Why don't you just click on the "encryption" tickbox in the installer? As for your question, you'd better just use
sudo -i alone, then you have a root shell you can enter the openssl command.â cylgalad
Sep 15 '16 at 8:10
Why don't you just click on the "encryption" tickbox in the installer? As for your question, you'd better just use
sudo -i alone, then you have a root shell you can enter the openssl command.â cylgalad
Sep 15 '16 at 8:10
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
From man sudo:
-i, --login
Run the shell specified by the target user's password dataâ base
entry as a login shell.
You can get an interactive shell running as root using any of the following methods (these are the full commands just run as is from an existing shell and they will give you a root shell).
sudo -i: Gives you a root prompt with a new shell environment (as if root did a login). Does acdto root's home directory as well.sudo shorsudo bash: Gives a basic root shell spawned in the environment of the calling user (sanitized by sudo).sudo -s -H: Gives a shell and resets $HOME, but doesn'tcdto $HOME likesudo -i.sudo su: Uses the normalsumethod of becoming root but doesn't need a root password.
Basically I use either sudo -i or sudo -s -H in most cases depending on if I wanted to end up in root's home directory or not.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
From man sudo:
-i, --login
Run the shell specified by the target user's password dataâ base
entry as a login shell.
You can get an interactive shell running as root using any of the following methods (these are the full commands just run as is from an existing shell and they will give you a root shell).
sudo -i: Gives you a root prompt with a new shell environment (as if root did a login). Does acdto root's home directory as well.sudo shorsudo bash: Gives a basic root shell spawned in the environment of the calling user (sanitized by sudo).sudo -s -H: Gives a shell and resets $HOME, but doesn'tcdto $HOME likesudo -i.sudo su: Uses the normalsumethod of becoming root but doesn't need a root password.
Basically I use either sudo -i or sudo -s -H in most cases depending on if I wanted to end up in root's home directory or not.
add a comment |Â
up vote
0
down vote
From man sudo:
-i, --login
Run the shell specified by the target user's password dataâ base
entry as a login shell.
You can get an interactive shell running as root using any of the following methods (these are the full commands just run as is from an existing shell and they will give you a root shell).
sudo -i: Gives you a root prompt with a new shell environment (as if root did a login). Does acdto root's home directory as well.sudo shorsudo bash: Gives a basic root shell spawned in the environment of the calling user (sanitized by sudo).sudo -s -H: Gives a shell and resets $HOME, but doesn'tcdto $HOME likesudo -i.sudo su: Uses the normalsumethod of becoming root but doesn't need a root password.
Basically I use either sudo -i or sudo -s -H in most cases depending on if I wanted to end up in root's home directory or not.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
From man sudo:
-i, --login
Run the shell specified by the target user's password dataâ base
entry as a login shell.
You can get an interactive shell running as root using any of the following methods (these are the full commands just run as is from an existing shell and they will give you a root shell).
sudo -i: Gives you a root prompt with a new shell environment (as if root did a login). Does acdto root's home directory as well.sudo shorsudo bash: Gives a basic root shell spawned in the environment of the calling user (sanitized by sudo).sudo -s -H: Gives a shell and resets $HOME, but doesn'tcdto $HOME likesudo -i.sudo su: Uses the normalsumethod of becoming root but doesn't need a root password.
Basically I use either sudo -i or sudo -s -H in most cases depending on if I wanted to end up in root's home directory or not.
From man sudo:
-i, --login
Run the shell specified by the target user's password dataâ base
entry as a login shell.
You can get an interactive shell running as root using any of the following methods (these are the full commands just run as is from an existing shell and they will give you a root shell).
sudo -i: Gives you a root prompt with a new shell environment (as if root did a login). Does acdto root's home directory as well.sudo shorsudo bash: Gives a basic root shell spawned in the environment of the calling user (sanitized by sudo).sudo -s -H: Gives a shell and resets $HOME, but doesn'tcdto $HOME likesudo -i.sudo su: Uses the normalsumethod of becoming root but doesn't need a root password.
Basically I use either sudo -i or sudo -s -H in most cases depending on if I wanted to end up in root's home directory or not.
answered Sep 15 '16 at 4:41
David
33412
33412
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f309986%2fhow-to-use-sudo-with-the-i-option%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Why don't you just click on the "encryption" tickbox in the installer? As for your question, you'd better just use
sudo -ialone, then you have a root shell you can enter theopensslcommand.â cylgalad
Sep 15 '16 at 8:10