10 keyboard shortcuts to improve your Linux experience (2023)

by Jack Wallen in Open source

on

10 keyboard shortcuts to improve your Linux experience

A few simple keyboard shortcuts can make your work in Linux far more efficient. Jack Wallen runs through 10 of his favorites, for both desktop environments and window managers.

Many Linux users are keyboard cowboys, breaking out in a cold, cold sweat when their nimble fingers have to leave the keyboard for the mouse. But even if you’re not like that, you can still employ some of those fantastic keyboard shortcuts that help make Linux commuting efficient. To get you started, here are my 10 favorite Linux keyboard shortcuts. Disclaimer: Some of these shortcuts will be desktop environment- or window manager-specific.

Note: This information is also available as a PDF download.

1: Ctl + Alt + Backspace

Use this shortcut when X isn’t responding or a program has locked up your desktop and you can’t get anything to respond. This combination instantly logs you out of X, taking you back to the login screen. It works with all desktop environments and window managers.

2: Ctrl + Alt + Delete

This is the big kahuna. If all else fails and you just need to reboot, you can hit this combination to instantly start the reboot process. All data will be lost, so use it wisely. This combination works in all desktop environments and all window managers.

3: Alt + Tab

This handy shortcut allows you to cycle through all open windows, stopping on the window you want to have focus. In other words, you don’t have to grab your mouse and click (or hover, depending upon your focus configuration) to give a window focus. To cycle through the windows, hold down the Alt key and then press the Tab key until you land on the window you want. This shortcut works in most desktop environments and window managers.

SEE: How Mark Shuttleworth became the first African in space and launched a software revolution (TechRepublic)

4: Ctrl + Alt + F*

This is one of those mack-daddy shortcuts you very well might need to use. It switches to various virtual terminals. The default terminal you’re working in is 6. So you can switch to another terminal by holding down Ctrl + Alt and hitting F1, F2, F3, F4, F5, F7, etc. Now these are virtual terminals, so if you already have a graphical interface going, you’ll only be able to work in a text-based terminal window. This is really good for debugging problems with the desktop or killing frozen applications when you don’t want to kill X completely.

5: Alt + Arrow key

If you’re using Linux, you probably know about the pager that allows you to have multiple desktops at one time. Instead of having to move your mouse to the edge of a screen, you can hit Alt and either the left or right arrow key to move from one desktop to another. This works in all desktop environments and window managers.

The following apply only to terminal (aka console) windows

6: Ctrl + a and Ctrl + e

If you are working in a text editor like Nano (from within a terminal window), you can get to the beginning of a line with Ctrl + a and the end of a line with Ctrl + e. These do not work in GUI applications. In a GUI application (such as OpenOffice), these combinations will work as they would in a normal desktop world. (For example, Ctrl + a will highlight all the text on a page.)

7: Ctrl + c

When you have a process running in a terminal window (say you’re following a process with the tail + f command), you can kill that process with the Ctrl + c combination.

8: Ctrl + z

This will zombie an application. If you have a process running in a terminal and you want the terminal back but don’t want to kill the application, you can hit Ctrl + z to send the process to the background. To get the process back, type fg.

9: Arrow up or Arrow down

The up or down arrow key, when in a terminal window, cycles through the history of commands you have issued in the terminal window. This is helpful for two reasons: You don’t have to retype commands all the time and you can more easily recall what commands have been run recently.

10: Ctrl + r

This is a handy command search tool. When you hit Ctrl + r, you are prompted to enter a character (or string of characters). You’ll have returned to you any previously issued command with that character or combination within. This is helpful because it does not discriminate between commands and switches. So if you can only remember a switch you used, you can enter that and the command will appear. When the command shows up you want, hit Enter to execute.

The keyboard advantage

These 10 simple Linux keyboard shortcuts will help you make your work in Linux far more efficient. Yes, there are plenty more beyond this list. Some shortcuts are specific to a particular environment, and many desktops or window managers allow you to create your own keyboard shortcuts. Use that feature, and you’ll find yourself working far more efficiently without having to move your hand from key to mouse and back.

10 keyboard shortcuts to improve your Linux experience (2)

Subscribe to the Daily Tech Insider Newsletter

Stay up to date on the latest in technology with Daily Tech Insider. We bring you news on industry-leading companies, products, and people, as well as highlighted articles, downloads, and top resources. You’ll receive primers on hot tech topics that will help you stay ahead of the game.

Delivered Weekdays

Sign up today

By Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic, The New Stack, and Linux New Media. He's covered a variety of topics for over twenty years and is an avid promoter of open source. For more news about Jack Wallen, visit his website jackwallen.com.

  • Account Information

    Contact Jack Wallen

  • |
  • See all of Jack's content
  • Open source

Editor's Picks

  • TechRepublic Premium

    TechRepublic Premium Editorial Calendar: IT Policies, Checklists, Hiring Kits and Research for Download

    TechRepublic Premium content helps you solve your toughest IT issues and jump-start your career or next project.

  • Artificial Intelligence

    Microsoft’s First Generative AI Certificate Is Available for Free

    Microsoft is also running a grant competition for ideas on using AI training in community building.

  • Cloud Security

    How Generative AI is a Game Changer for Cloud Security

    Generative AI will be a game changer in cloud security, especially in common pain points like preventing threats, reducing toil from repetitive tasks, and bridging the cybersecurity talent gap.

  • Payroll

    The 8 Best International Payroll Services for 2023

    Does your business need a payroll provider that offers international payroll services? Use our buyer's guide to review the best solutions, from ADP to Oyster.

  • Artificial Intelligence

    ChatGPT Cheat Sheet: Complete Guide for 2023

    Get up and running with ChatGPT with this comprehensive cheat sheet. Learn everything from how to sign up for free to enterprise use cases, and start using ChatGPT quickly and effectively.

  • Project Management

    6 Best monday.com Competitors and Alternatives for 2023

    Looking for an alternative to monday.com? Our comprehensive list covers the best monday alternatives, their key features, pricing, pros, cons and more.

10 keyboard shortcuts to improve your Linux experience (10)

Subscribe to the Daily Tech Insider Newsletter

Stay up to date on the latest in technology with Daily Tech Insider. We bring you news on industry-leading companies, products, and people, as well as highlighted articles, downloads, and top resources. You’ll receive primers on hot tech topics that will help you stay ahead of the game.

Delivered Weekdays

Sign up today

FAQs

10 keyboard shortcuts to improve your Linux experience? ›

Ctrl+R/O/G

This is very helpful with long and chained commands. Ctrl+R: Recall the last command matching the characters you provide. Ctrl+R (again): Navigate through the matching commands. Ctrl+O: Send the command back to your terminal or select Enter to execute the command from the search mode.

What is Ctrl +R in Linux? ›

Ctrl+R/O/G

This is very helpful with long and chained commands. Ctrl+R: Recall the last command matching the characters you provide. Ctrl+R (again): Navigate through the matching commands. Ctrl+O: Send the command back to your terminal or select Enter to execute the command from the search mode.

What is a shortcut for Linux? ›

General Linux Shortcuts
S.No.ShortcutDescription
1.Ctrl+ZThis shortcut will undo the last action.
2.Ctrl+NUsing this shortcut, we can create a new file.
3.Ctrl+QThis shortcut will quit the application in focus.
4.Ctrl+SWe use this shortcut to save the file which is presently opened.
4 more rows

What does Ctrl Alt F2 do Linux? ›

Ctrl+Alt+F2 in Linux

With some early variants of Linux, pressing Ctrl + Alt + F2 switches to the second/first open console window (virtual terminal). With recent versions of Linux, the GUI (graphical user interface) is loaded as the first virtual terminal instead of the seventh one.

What does Ctrl K do in Linux? ›

Similarly, CTRL+K erases everything from the current cursor position to the end of the line. Shortcuts: Instead of Backspace, use CTRL+U.

What is Ctrl F on Linux? ›

CTRL-b --- go backwards without deleting. CTRL-f --- go forward without deleting.

What does Ctrl M do in Linux? ›

1 Answer. Ctrl+M sends the same character(RET) as the Enter key in terminal. Programs have no way to tell them apart, so these keys cannot be configured separately. Ctrl+Q is already used for XON by default, so it cannot be used by Bash, but you should still be able to use it in tmux, because tmux uses raw input mode.

What is the super key in Linux? ›

Super key (❖) is an alternative and older name for what is commonly labelled as the Windows key or Command key on modern keyboards, typically bound and handled as such by Linux and BSD operating systems and software today. The Super key was originally a modifier key on a keyboard designed for Lisp machines at MIT.

What is Ctrl D used for Linux? ›

In the Linux shell, press Ctrl+D: Pressing Ctrl+D in the Linux command-line shell logs you out of the interface. If you used the Sudo command to perform instructions as another user, hitting Ctrl+D quits that other user and returns you to the original user.

What is Ctrl B in Linux? ›

ctrl-b: moves the cursor backward one character at a time (same as the left arrow). alt-f: moves the cursor forward one word (same as pressing ctrl + right arrow). alt-b: moves the cursor backward one word (same as pressing ctrl + left arrow).

What is Alt F7 in Linux? ›

Ctrl+Alt+F7 or Alt+Ctrl+F7 is a keyboard shortcut used to switch between open console windows in Linux.

What does Ctrl P do in Linux? ›

Ctrl + p Previous command in history (i.e. walk back through the command history). Ctrl + n Next command in history (i.e. walk forward through the command history). Ctrl + s Go back to the next most recent command.

What does Ctrl Alt F5 do in Linux? ›

Ctrl+Alt+F5 in Linux

With some early variants of Linux, pressing Ctrl + Alt + F5 switches to the sixth/fifth open console window (virtual terminal). With recent versions of Linux, the GUI (graphical user interface) is loaded as the first virtual terminal instead of the seventh one.

What does Ctrl T do in Linux? ›

This key combination, a binding inherited from the emacs text editor, causes the last 2 characters typed to be swapped at the end of the line, used in the middle of a line, it swaps the character at the left of the cursor and the one under the cursor.

What does Ctrl shift E do in Linux? ›

Ctrl + Shift + e is the emoji entry shortcut/hotkey sequence.

What is the use of Ctrl R? ›

Ctrl+R in an Internet browser

In all major Internet browsers (e.g., Chrome, Edge, Firefox, Opera), pressing Ctrl + R refreshes (reloads) the current web page.

What does Ctrl R do in files? ›

Copy, paste, and other general keyboard shortcuts
Press this keyTo do this
Ctrl + R (or F5)Refresh the active window.
Ctrl + YRedo an action.
Ctrl + Right arrowMove the cursor to the beginning of the next word.
Ctrl + Left arrowMove the cursor to the beginning of the previous word.
47 more rows

How do you reset Ctrl R in Linux? ›

To reset Ctrl + R , the usual Emacs key Ctrl + G can do. If you want to reverse Ctrl + R by one step, instead of working your way up from the bottom again, you can use Ctrl + S . The trick is Ctrl + S is also used to pause the terminal.

How to use R in Linux? ›

Running R from a bash script in Linux
  1. First, create the r-bash-example.sh with the following content: #!/bin/bash R --no-save <
  2. Now, make this file executable by $ chmod +x r-bash-example.sh.
  3. To run the R function included in this file type: $ ./r-bash-example.sh.
Jan 12, 2022

Top Articles
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated: 17/01/2024

Views: 5499

Rating: 4.7 / 5 (57 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.