what are the most common linux terminal shortcuts that you use ?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
for commands that require a lot of arguments that need to be issued the same way every time i do
$ history | grep command (minus the arguments)
for instance
$ $history | grep vlc
frieza, you may be interested to know, you can use "ctrl + r" and type "vlc" to reverse incremental search the history.
Pressing ctrl+r repeatedly again, to scroll through the matched entries, until you find the one you want.
This will create a folder called Months with subfolders of the months
and each sub month folder will have subfolders from Week1 through Week4
and each Week* folder will have subfolders of the days of the week
This is good for making folders that each would have things in common
Try it out and you see what I mean.
Bet no GUI file manager could top that
Last edited by linux-freak; 01-03-2012 at 02:36 AM.
Here's what's in my cheat-sheet.txt right now for Bash. I don't use all of these regularly, but they have all been useful on some occasions.
Code:
** CURSOR MOVEMENT **
C-f, C-b forward, backward one character
M-f, M-b forward, backward one word
C-a, C-e start, end of line
C-], M-C-] search next, previous occurrence of character in line
** DELETING **
<Backsp> character left of cursor
<Del> | C-d character under cursor
** MISCELLANEOUS EDITING **
C-_ | C-x C-u | C-/ undo last edit
C-t transpose character left of cursor
M-t transpose word left of cursor
M-u uppercase word
M-l lowercase word
M-r undo all changes to this line
C-l clear screen and continue editing current line
C-x C-e edit the current line in the $EDITOR
** COMPLETION **
<Tab> complete text before point
M-? list all completions
M-* insert all completions
M-~ force tilde completion
** KILLING AND YANKING TEXT **
C-k kill from cursor to end of line
C-u kill from cursor to start of line
M-- C-k kill from cursor to start of line
M-d kill from cursor to end of word
M-<Backsp> kill from cursor to start of word
C-w kill from cursor to previous whitespace
C-y yank most recently killed text at cursor
M-y rotate kill-ring and yank
** RECALLING FROM HISTORY **
C-p, C-n recall previous, next line from history
M-< recall first line from history
M-> recall last line from history
M-p, M-n reverse, forward search (non-incremental)
C-r, C-s reverse, forward i-search
<Return> accept and execute line
C-a | <Esc> accept and edit at start of line
C-e accept and edit at end of line
C-g abort i-search and restore original line
** REPEATING COMMANDS **
<Esc> n (where n represents an integer)
M-n (only first digit need be metafied)
C-x ( begin keyboard macro definition
C-x ) end keyboard macro definition
C-x e execute keyboard macro
HTH
EDIT
In the absence of further documentation, the list above may seem quite arcane to the uninitiated. As this is a cheat sheet intended for my personal use I only recorded enough information to remind myself. Here's the full documentation:
I use Bash in its default Emacs mode. If you have configured Bash for vi mode or otherwise customized its key-bindings then none of the shortcuts above apply to your configuration.
The notation C-p means to press and release the p key while holding the Ctrl (control) key.
The notation M-f means to press and release the f key while holding the Meta key. Typical modern PC keyboards don't have a key labeled Meta. Use the Alt key instead.
Last edited by Telengard; 01-04-2012 at 11:23 PM.
Reason: more information
I barely know how to use Emacs. But several of the hotkeys I mentioned earlier do work there, too. I wonder -- to what extent do Emacs shortcuts carry over into the Bash shell?
to what extent do Emacs shortcuts carry over into the Bash shell?
A great deal of the most common Emacs keyboard shortcuts work similarly in Bash's default Emacs mode. If you learn the shortcuts in Bash, as I did, then Emacs becomes that much easier to learn.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.