I am a linux newbie. Is there any other cool techniques like the TAB completion in the gnome terminal? I am using the bash shell.

link|improve this question
Tab completion is a feature of the shell, not the terminal. Shells have lots of cool features (which shell are you using). Terminals have a fair share of cool features, too. Your question is overly broad. – Dennis Williamson Aug 30 '10 at 17:30
feedback

5 Answers

The terminal is just a vehicle for interacting with programs that use that kind of an interface. It's usually called 'the command line', and a really great essay by Neal Stephenson about it as a cultural artifact titled "In the Beginning was the Command Line".

The terminal program itself has some nifty features. But those are for things like using international fonts and character sets and various options for exactly what things should look like and stuff like that.

The feature of TAB completion is implemented by a program that uses the terminal program to present its user interface to you. That program is generally called "the shell". The most common default shell on Linux systems is bash, otherwise known as the "Bourne Again SHell".

bash is chock full of features. It's so featureful that you can actually write complex programs in it. This is called 'shell programming'. Many times you can do some amazing things with programs that are only one or two lines long that you type on the command line.

Some of the more useful things to know about are find, xargs, and grep. These in combination allow for powerful search capabilities that exceed those found in things like 'Spotlight' on OS X.

Another useful thing to know is that for many commands you can type command --help and find out more about it. Try this with find --help. And more comprehensive manuals can be found using man command. The paging program that is typically used to page through these multiple page manuals is called less (because there was an older program called more and less is more). The less paging program can be exited by typing the q key, and the PgUp and PgDown keys should work to page through the manual.

link|improve this answer
feedback

often used by me

ctrl+r text

searches your command history

link|improve this answer
feedback

if you want some bash key combinations, I think all of these comes from readline:

  • ctrl+w ctrl+u:
    • erases current line to cursor (and put on a paste buffer)
  • ctrl+t:
    • swaps character at cursor and previous character an advances a character
  • ctrl+y:
    • inserts paste buffer at cursor
  • ctrl+o:
    • same as enter
  • ctrl+k:
    • erases current line from cursor (and put on a paste buffer)
  • ctrl-c:
    • dismiss current commandline (enter but no execute)
  • ctrl-r: (see Phil D's)
    • reverse search history, search text as you type, hit ctrl-r again to search back with current search text
link|improve this answer
feedback

As the above message says, the 'power usage' you mention is part of the bash shell, not gnome-terminal. Strictly as a terminal app, gnome-terminal is actually (intentionally) does not include the bells and whistles of Konsole.

What are you trying to ask? Are you asking for all Linux power tips? That will take years to read. Or are you asking specifically about bash/terminal power tips? Also years, but maybe somewhat fewer.

Bash power tips that I personally use:

If you haven't discovered aliases, you'll like them.

A lot of people like to trick out their prompt. For an overload of info, check out http://www.yolinux.com/HOWTO/Bash-Prompt-HOWTO.html.

The tab completion is just a subset of very powerful command completion. Some are builtin, but you can program your own. A very simple but surprisingly useful snippet would be:

complete -d cd pushd rmdir

complete -e printenv unexport

Which would make cd, pushd, and rmdir only use directories on completion, and tab completion for printenv would show all exported environment variables. There are a bunch of examples at http://www.caliban.org/bash/

This is an intentionally simple set to get you going, there's a lot more you can do.

link|improve this answer
feedback

Here are some good links for learning some cool things you can do with the command line.

http://www.oreillynet.com/onlamp/blog/2005/04/bash_tricks_from_the_developer.html

http://www.linuxtutorialblog.com/post/tutorial-the-best-tips-tricks-for-bash

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.