Step by step
Open the Terminal
application and copy/paste the following command in the window that opens (called a terminal or console) and press Enter:
sudo sed -i 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="acpi_osi=Linux"/g' /etc/default/grub
You'll be prompted for a password. Enter your Ubuntu password, followed by Enter.
- Note that your key-presses will not show up as asterisks or anything else while you are typing your password; this is a security feature and is normal.
What we're doing here
Prefixing a command with sudo
runs it with administrative (or, in Unix terminology, root) privileges.
sed
is the Unix command-line string editor.
The -i
option makes sed
edit files in-place instead of simply showing you what would be changed but not actually saving the changes.
The 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="acpi_osi=Linux"/g'
part is what does the search and replace.
/etc/default/grub
is the file to edit. It's a configuration file for Grub
, Ubuntu's bootloader (the program that loads Ubuntu when you turn on your computer).
Update Grub with the changes
Run this command:
sudo update-grub
This makes Grub see the changes in its configuration file and apply the new config.
Try it out
Reboot your computer to test out the change you made. If it works, you're good to go, and you've successfully edited you're first file using the command line!
Congratulations :)