How to check if ubuntu has booted in uefi mode?
I have installed ubuntu 18.04 in my pc in dual boot with windows 10. I need to check if ubuntu is booting in uefi mode or legacy mode. I found a few sources online to check this, but I'm getting ambiguous results.
To be specific, this page, section "Identifying if an Ubuntu has been installed in UEFI mode" gives 3 ways to check this.
- its /etc/fstab file contains an UEFI partition (mount point: /boot/efi)
- it uses the grub-efi bootloader (not grub-pc)
- from the installed Ubuntu, open a terminal (Ctrl+Alt+T) then type the following command:
[ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode"
I tried 1st and 3rd ways.
My fstab file contains the below entry:
UUID=xxx /boot/efi ntfs defaults 0 1
So, that means ubuntu has booted in uefi mode.
But running the command given in 3rd method
[ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode"
prints Installed in Legacy mode
So, my question is which is correct? Which is a reliable method for ubuntu 18.04?
boot dual-boot 18.04 uefi
New contributor
add a comment |
I have installed ubuntu 18.04 in my pc in dual boot with windows 10. I need to check if ubuntu is booting in uefi mode or legacy mode. I found a few sources online to check this, but I'm getting ambiguous results.
To be specific, this page, section "Identifying if an Ubuntu has been installed in UEFI mode" gives 3 ways to check this.
- its /etc/fstab file contains an UEFI partition (mount point: /boot/efi)
- it uses the grub-efi bootloader (not grub-pc)
- from the installed Ubuntu, open a terminal (Ctrl+Alt+T) then type the following command:
[ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode"
I tried 1st and 3rd ways.
My fstab file contains the below entry:
UUID=xxx /boot/efi ntfs defaults 0 1
So, that means ubuntu has booted in uefi mode.
But running the command given in 3rd method
[ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode"
prints Installed in Legacy mode
So, my question is which is correct? Which is a reliable method for ubuntu 18.04?
boot dual-boot 18.04 uefi
New contributor
add a comment |
I have installed ubuntu 18.04 in my pc in dual boot with windows 10. I need to check if ubuntu is booting in uefi mode or legacy mode. I found a few sources online to check this, but I'm getting ambiguous results.
To be specific, this page, section "Identifying if an Ubuntu has been installed in UEFI mode" gives 3 ways to check this.
- its /etc/fstab file contains an UEFI partition (mount point: /boot/efi)
- it uses the grub-efi bootloader (not grub-pc)
- from the installed Ubuntu, open a terminal (Ctrl+Alt+T) then type the following command:
[ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode"
I tried 1st and 3rd ways.
My fstab file contains the below entry:
UUID=xxx /boot/efi ntfs defaults 0 1
So, that means ubuntu has booted in uefi mode.
But running the command given in 3rd method
[ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode"
prints Installed in Legacy mode
So, my question is which is correct? Which is a reliable method for ubuntu 18.04?
boot dual-boot 18.04 uefi
New contributor
I have installed ubuntu 18.04 in my pc in dual boot with windows 10. I need to check if ubuntu is booting in uefi mode or legacy mode. I found a few sources online to check this, but I'm getting ambiguous results.
To be specific, this page, section "Identifying if an Ubuntu has been installed in UEFI mode" gives 3 ways to check this.
- its /etc/fstab file contains an UEFI partition (mount point: /boot/efi)
- it uses the grub-efi bootloader (not grub-pc)
- from the installed Ubuntu, open a terminal (Ctrl+Alt+T) then type the following command:
[ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode"
I tried 1st and 3rd ways.
My fstab file contains the below entry:
UUID=xxx /boot/efi ntfs defaults 0 1
So, that means ubuntu has booted in uefi mode.
But running the command given in 3rd method
[ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode"
prints Installed in Legacy mode
So, my question is which is correct? Which is a reliable method for ubuntu 18.04?
boot dual-boot 18.04 uefi
boot dual-boot 18.04 uefi
New contributor
New contributor
New contributor
asked 1 hour ago
Nagabhushan S NNagabhushan S N
1085
1085
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
The easiest way to find out if you are running UEFI or BIOS is to look for a folder /sys/firmware/efi
.
The folder will be missing if your system is using BIOS.
Execute:
$ ls /sys/firmware/efi
Example of UEFI boot output :
This directory is not present. But fstab file has boot/efi mount-point. Ambiguous right?
– Nagabhushan S N
1 hour ago
2
You boot in BIOS mode
– Carlos Dagorret
1 hour ago
add a comment |
You can use the following command line,
test -d /sys/firmware/efi && echo efi || echo bios
or longer but easier to understand
if test -d /sys/firmware/efi;then echo efi;else echo bios;fi
See the following link,
help.ubuntu.com/community/Installation/FromUSBStick#Test_if_running_in_UEFI_mode
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
Nagabhushan S N is a new contributor. Be nice, and check out our Code of Conduct.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111045%2fhow-to-check-if-ubuntu-has-booted-in-uefi-mode%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
The easiest way to find out if you are running UEFI or BIOS is to look for a folder /sys/firmware/efi
.
The folder will be missing if your system is using BIOS.
Execute:
$ ls /sys/firmware/efi
Example of UEFI boot output :
This directory is not present. But fstab file has boot/efi mount-point. Ambiguous right?
– Nagabhushan S N
1 hour ago
2
You boot in BIOS mode
– Carlos Dagorret
1 hour ago
add a comment |
The easiest way to find out if you are running UEFI or BIOS is to look for a folder /sys/firmware/efi
.
The folder will be missing if your system is using BIOS.
Execute:
$ ls /sys/firmware/efi
Example of UEFI boot output :
This directory is not present. But fstab file has boot/efi mount-point. Ambiguous right?
– Nagabhushan S N
1 hour ago
2
You boot in BIOS mode
– Carlos Dagorret
1 hour ago
add a comment |
The easiest way to find out if you are running UEFI or BIOS is to look for a folder /sys/firmware/efi
.
The folder will be missing if your system is using BIOS.
Execute:
$ ls /sys/firmware/efi
Example of UEFI boot output :
The easiest way to find out if you are running UEFI or BIOS is to look for a folder /sys/firmware/efi
.
The folder will be missing if your system is using BIOS.
Execute:
$ ls /sys/firmware/efi
Example of UEFI boot output :
edited 1 hour ago
answered 1 hour ago
Carlos DagorretCarlos Dagorret
48326
48326
This directory is not present. But fstab file has boot/efi mount-point. Ambiguous right?
– Nagabhushan S N
1 hour ago
2
You boot in BIOS mode
– Carlos Dagorret
1 hour ago
add a comment |
This directory is not present. But fstab file has boot/efi mount-point. Ambiguous right?
– Nagabhushan S N
1 hour ago
2
You boot in BIOS mode
– Carlos Dagorret
1 hour ago
This directory is not present. But fstab file has boot/efi mount-point. Ambiguous right?
– Nagabhushan S N
1 hour ago
This directory is not present. But fstab file has boot/efi mount-point. Ambiguous right?
– Nagabhushan S N
1 hour ago
2
2
You boot in BIOS mode
– Carlos Dagorret
1 hour ago
You boot in BIOS mode
– Carlos Dagorret
1 hour ago
add a comment |
You can use the following command line,
test -d /sys/firmware/efi && echo efi || echo bios
or longer but easier to understand
if test -d /sys/firmware/efi;then echo efi;else echo bios;fi
See the following link,
help.ubuntu.com/community/Installation/FromUSBStick#Test_if_running_in_UEFI_mode
add a comment |
You can use the following command line,
test -d /sys/firmware/efi && echo efi || echo bios
or longer but easier to understand
if test -d /sys/firmware/efi;then echo efi;else echo bios;fi
See the following link,
help.ubuntu.com/community/Installation/FromUSBStick#Test_if_running_in_UEFI_mode
add a comment |
You can use the following command line,
test -d /sys/firmware/efi && echo efi || echo bios
or longer but easier to understand
if test -d /sys/firmware/efi;then echo efi;else echo bios;fi
See the following link,
help.ubuntu.com/community/Installation/FromUSBStick#Test_if_running_in_UEFI_mode
You can use the following command line,
test -d /sys/firmware/efi && echo efi || echo bios
or longer but easier to understand
if test -d /sys/firmware/efi;then echo efi;else echo bios;fi
See the following link,
help.ubuntu.com/community/Installation/FromUSBStick#Test_if_running_in_UEFI_mode
answered 39 mins ago
sudodussudodus
23.4k32874
23.4k32874
add a comment |
add a comment |
Nagabhushan S N is a new contributor. Be nice, and check out our Code of Conduct.
Nagabhushan S N is a new contributor. Be nice, and check out our Code of Conduct.
Nagabhushan S N is a new contributor. Be nice, and check out our Code of Conduct.
Nagabhushan S N is a new contributor. Be nice, and check out our Code of Conduct.
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.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111045%2fhow-to-check-if-ubuntu-has-booted-in-uefi-mode%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
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