Ten keyboard shortcuts to improve Linux

Daily Newsletters

Sign up to ZDNet UK's daily newsletter.

Topics

Linux, Shortcuts

ANALYSIS

Many Linux users are keyboard cowboys, breaking out in a 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 use some of those fantastic keyboard shortcuts that help make Linux commuting efficient.

To get you started, here are 10 handy Linux keyboard shortcuts.

Note that some of these shortcuts will be desktop environment- or window manager-specific.

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.

4. Ctrl + Alt + F*
This is one of those 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, and so on. 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.

NB The following shortcuts apply only to terminal (aka console) windows.

6. Ctrl + a and Ctrl + e
If you are working in a text editor such as 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: first, you don't have to retype commands all the time; and second, you can more easily recall which 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.

Post your comment

In order to post a comment you need to be registered and logged in.

You can also log in with Facebook. Log in or create your ZDNet UK account below

  • Login

Will not be displayed with your comment

By signing up for this service, you indicate that you agree to our Terms and Conditions and have read and understood our Privacy Policy. Questions about membership? Find the answers in the Community FAQ

Get ZDNet UK's daily newsletter

Enter your email address to sign up

ZDNet UK Live

Roberto_Store

Now On Sale, Unlocked iPhone 4S / Galaxy Note In Factory Box. Roberto-Techie(UK) ”Now on Sales” Smartphone, Android,Tablets,Gadget &...

2 hours ago by Roberto_Store on Samsung Galaxy S III lined up for sale
Paul Smyth

Is this classic FUD? One thing I would definitely have notice is a Mozilla threat to stop supporting GNU/Linux.

4 hours ago by Paul Smyth via Facebook on Firefox rapid release improves Fedora Linux
UnderINK

I agree with the previous commenter wholeheartedly. I couldn't say it better myself. This is very 'Big Brother'. And while I agree with protecting...

8 hours ago by UnderINK on European e-identity plan to be unveiled this month
Simon Bisson and Mary Branscombe

Nice to see that Turing's idea of a general purpose computer doing once-hardware-powered tasks in software is now universal ;-) Mary

13 hours ago by Simon Bisson and Mary Branscombe on Software with everything
Jason Burchell

seriously now. I've only bothered to read a small bit of the comments. do me and the rest of the world a favour. stop saying it does not work or...

17 hours ago by Jason Burchell via Facebook on Music industry negotiating over 24-bit downloads
Philip Charles Cohen

Read about it and weep, John Donahoe ... In addition to Visa’s V.me, there is now MasterCard’s PayPass digital wallet soon to arrive; another...

21 hours ago by Philip Charles Cohen via Facebook on PayPal takes phone-based payments to the high street
apexwm

Leslie Satenstein : Where have you ever seen Mozilla even mention this? Firefox is the most popular browser in the GNU/Linux OS, so I don't see...

22 hours ago by apexwm on Firefox rapid release improves Fedora Linux
songmaster

SHleG: Do you remember building a clockwork scorpion kit (I'm pretty sure I have a photo of it somewhere) — I think it was called something like...

24 hours ago by songmaster on Software with everything
Chris Wortman

Good I love Yahoo! Their search engine is getting better than Google as of late. I find more of what I want on the first page, and usually within...

1 day ago by Chris Wortman via Facebook on Linux Mint 13 ramps up for KDE release
PatrickG

openhgs has made the point for Windows 8 multiple monitors without realising it! With Windows 7 you have to switch the mouse and so your focus...

1 day ago by PatrickG on Windows 8 could speed multi-monitor uptake
Leslie Satenstein

Mozilla has threatened to stop supporting Linux. I guess that UBUNTU is going with another browser. I indicated that if Mozilla stops supporting...

1 day ago by Leslie Satenstein via Facebook on Firefox rapid release improves Fedora Linux
Andy Bolstridge

Much as I abhor Microsoft's licensing practices, this is almost certainly down to purchasing IT equipment via 3rd party consultants - you get the...

1 day ago by Andy Bolstridge via Facebook on 6 million wasted licences and £1,200 PCs: welcome to government IT
Jack Schofield

@openhgs Windows users have had multiple desktops since Linus started writing Linux. They just haven't shipped as standard because not enough...

2 days ago by Jack Schofield on Windows 8 could speed multi-monitor uptake
Jack Schofield

@Phil at Cloud4 What, Microsoft gets £1,200 per PC and £1,622 per server? Gosh, I'm amazed....

2 days ago by Jack Schofield on 6 million wasted licences and £1,200 PCs: welcome to government IT
craigsc

You guys have no idea what is going on at Autonomy. Autonomy could have been a much more profitable organization. The sales operations at Autonomy...

2 days ago by craigsc on HP cuts 27,000 staff as Autonomy chief Lynch leaves
Moley

How does this impact on dual or multi booting? Seems to me to more or less prohibit this, from Windows 8 anyway. Will Grub 2 recognise Windows 8,...

2 days ago by Moley on Windows 8 start-up speed forces USB boot workaround
apexwm

I don't understand why there cannot be a slight pause during the boot process so the user can press a key. Many operating systems do this, even if...

2 days ago by apexwm on Windows 8 start-up speed forces USB boot workaround
Gavin Goodman

You can now buy the Xi3 modular computer in the UK at http://www.ocdistribution.com . This can be bought with the Tand3m software, pricing and...

2 days ago by Gavin Goodman on CES 2012: Xi3 microSERV3R
Phil at Cloud4

I agree: Mike Lynch can clearly build a business and manage strategy. I suspect the exit of Mike is more likely the end of a planned handover...

2 days ago by Phil at Cloud4 on HP cuts 27,000 staff as Autonomy chief Lynch leaves
Phil at Cloud4

This is unbeleivable government wastage with only one winner... Microsoft 1 - Tax payer Nil!

2 days ago by Phil at Cloud4 on 6 million wasted licences and £1,200 PCs: welcome to government IT