0
点赞
收藏
分享

微信扫一扫

Run a Raspberry PI without the GUI

Yaphets_巍 2024-09-23 阅读 3


To run your Raspberry Pi without the GUI and use only the command line, follow these steps:

Temporarily Disable GUI

  1. Open a Terminal (if you have access to the GUI).
  2. Enter the following command to stop the GUI temporarily:

sudo systemctl stop lightdm

Replace lightdm with the display manager your system uses (e.g., gdm, sddm, etc.).

  1. When you’re done and want to restart the GUI, you can run:

sudo systemctl start lightdm

Disable GUI on Boot

If you want to disable the GUI permanently and boot straight into the command line:

  1. Open a Terminal.
  2. Run the following command to edit the configuration file:

sudo nano /etc/default/grub

  1. Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and modify it to:

GRUB_CMDLINE_LINUX_DEFAULT="text"

  1. Save the file and exit (Ctrl+X, then Y, then Enter).
  2. Update GRUB with:

sudo update-grub

  1. Finally, reboot your Raspberry Pi:

sudo reboot

With these steps, your Raspberry Pi will boot into command line mode by default, saving on power consumption. If you ever need to use the GUI, you can manually start it with the command startx or re-enable it for future boots.


举报

相关推荐

0 条评论