The Best Keyboard Shortcuts for Bash (aka the Linux and macOS Terminal)

Bash is the default command-line shell on most Linux distributions, from Ubuntu and Debian to Red Hat and Fedora. Bash is also the default shell included with macOS, and you can install a Linux-based bash environment on Windows 10.

The bash shell features a wide variety of keyboard shortcuts you can use. These will work in bash on any operating system. Some of them may not work if you’re accessing bash remotely through an SSH or telnet session, depending on how you have your keys mapped.

Want to Learn More? Get Linux Training from the Linux Foundation

Learn everything you could want to know about Linux with comprehensive online Linux courses and certification tests that include the real-world experience and first-hand knowledge of what it takes to be a successful Linux developer or system administration professional, all from a web browser in the comfort of your home.

The Linux Foundation is the nonprofit consortium dedicated to fostering the growth of Linux. Founded in 2000, they are supported by the leading technology companies and developers from around the world.

Working With Processes

Use the following shortcuts to manage running processes.

  • Ctrl+C: Interrupt (kill) the current foreground process running in in the terminal. This sends the SIGINT signal to the process, which is technically just a request—most processes will honor it, but some may ignore it.
  • Ctrl+Z: Suspend the current foreground process running in bash. This sends the SIGTSTP signal to the process. To return the process to the foreground later, use the fg process_name command.
  • Ctrl+D: Close the bash shell. This sends an EOF (End-of-file) marker to bash, and bash exits when it receives this marker. This is similar to running the exit command.

Controlling the Screen

The following shortcuts allow you to control what appears on the screen.

  • Ctrl+L: Clear the screen. This is similar to running the “clear” command.
  • Ctrl+S: Stop all output to the screen. This is particularly useful when running commands with a lot of long, verbose output, but you don’t want to stop the command itself with Ctrl+C.
  • Ctrl+Q: Resume output to the screen after stopping it with Ctrl+S.

Moving the Cursor

Use the following shortcuts to quickly move the cursor around the current line while typing a command.

  • Ctrl+A or Home: Go to the beginning of the line.
  • Ctrl+E or End: Go to the end of the line.
  • Alt+B: Go left (back) one word.
  • Ctrl+B: Go left (back) one character.
  • Alt+F: Go right (forward) one word.
  • Ctrl+F: Go right (forward) one character.
  • Ctrl+XX: Move between the beginning of the line and the current…

How to Maximize Your Linux Laptop’s Battery Life

Laptop manufacturers spend a lot of time tuning their device drivers for Windows battery life. Linux usually doesn’t get the same attention. Linux may perform just as well as Windows on the same hardware, but it won’t necessarily have as much battery life.

Linux’s battery usage has improved dramatically over the years. The Linux kernel has gotten better, and Linux distributions automatically adjust many settings when you’re using a laptop. But you can still do some things to improve your battery life.

Basic Battery-Saving Tips

Before you do anything too complex, adjust the same settings you would on a Windows laptop or MacBook to maximize battery life.

For example, tell your Linux laptop to suspend—this is what Linux calls sleep mode—more quickly when you’re not using it. You’ll find this option in your Linux desktop’s settings. For example, head to System Settings > Power on an Ubuntu desktop.

Screen brightness can affect battery life dramatically. The brighter your display backlight, the worse your battery life will be. If your laptop has hotkeys to change screen brightness, try them—they’ll hopefully work on Linux, too. If not, you’ll find this option somewhere in your Linux desktop’s settings. It’s available at System Settings > Brightness & Lock on Ubuntu.

You can also tell your Linux desktop to turn off the screen more quickly when it’s inactive. The laptop will use less power when its screen is off. Don’t use a screensaver, as those just waste power by making your computer do more work and leaving the display on.

You can also disable hardware radios you don’t use. For example, if you don’t use Bluetooth, you can disable it to gain some more battery life. Head to System Settings > Bluetooth to disable Bluetooth on an Ubuntu desktop.

If you’re not using Wi-Fi, you can save a bit of power by disabling that, too. On Ubuntu, head to System Settings > Network and enable “Airplane Mode” to disable Wi-Fi and other wireless radios.

Remember that what you do with the laptop is also important. Running heavier software and using more CPU resources will cause your laptop to use more battery power. For this reason, you may want to look at a more lightweight desktop environment, such as the Lxde-based Lubuntu instead of the Unity-based main Ubuntu desktop.

Install Proprietary Graphics Drivers (If You Need Them)

If your laptop has integrated Intel graphics, congratulations. You shouldn’t need to worry about power management issues with your graphics drivers. Intel graphics aren’t the fastest, but they have excellent open-source driver support and “just work” out of the box.

If your laptop has NVIDIA or AMD graphics, however, you may need to do some work to decrease power consumption.

The worst case scenario is a laptop with NVIDIA Optimus or AMD’s switchable graphics. Such laptops have two different GPUs. For example, an NVIDIA Optimus laptop will have both a more powerful, battery-draining NVIDIA GPU and a less powerful, battery-friendly Intel GPU. On…

Seven Useful Chromebook Tricks You Should Know About


Chromebooks aren’t like traditional laptops. While they’re much simpler, they still have various useful features you may not know about. From accessing remote computers and printing to wiping your personal data, recovering Chrome OS, and installing desktop Linux, these tricks will help you get the most out of your Chromebook.

Control Who Can Log In

Chromebooks are marketed as laptops “for everyone.” By default, anyone with your laptop can pick it up, plug in their Google account, and log in. They won’t be able to access your data, but they will be able to use the machine with their own Chrome setup.

If you want to restrict access to your Chromebook, open the Settings menu by clicking the system tray and choosing the cog icon. From there, scroll down to the “People” section and click the Manage Other Users button.

Screenshot 2017-02-02 at 9.53.20 AM

From here, you can choose how much (or little) you’d like to restrict the device from other users, up to and including locking everyone out who isn’t you. It’s your Chromebook, you can be selfish with it!

Screenshot 2017-02-02 at 9.52.10 AM

Access Remote Windows, Mac, and Linux Desktops

You can’t run Windows programs on your Chromebook, but you can access remote Windows, Mac, and Linux desktops. The Chrome Web Store offers VNC clients for connecting to traditional VNC servers, but Chrome actually has Google-built remote desktop features as well. You can use this to access your desktop PC from a Chromebook or to remotely run that rare Windows application.

To do this, install the Chrome Remote Desktop app in Chrome on your PC. You can then activate the “Enable remote connections” option and connect to your PC from your Chromebook using the Chrome Remote Desktop app there.

This isn’t a Chrome OS-only feature, either. You can also use Google Chrome to remotely access Windows, Mac, and Linux PCs from any other type of PC, whether you have a Chromebook or not.


Print a Document with Google Cloud Print

If you ever need to print something, you should be aware that you can’t plug printers directly into your Chromebook and print to them. However, you can set up Google Cloud Print and use it to remotely print to supported printers from your Chromebook.

To add a printer to your Chromebook, jump into the Settings menu and scroll down till you see “Show Advanced Settings.” Click that.

Screenshot 2017-02-02 at 9.58.43 AM

Scroll down this menu to the “Google Cloud Print” section, then click the Manage button.