Posts Tagged ‘terminal’

File System Hierarchy

Acquaintance with the Unix/Linux file system hierarchy is necessary. The hierarchy doesn’t change often, but some Distributions(distros) prefer their unique blend.

Derivatives from a particular architecture like fedora from RedHat, Ubuntu from debian, doesnt change much.

Man pages like hier, proc will help a lot. Invoke as
$ man [hier/proc]. They will work with all major distros.

The most important are the configuration files for various packages like Apache, Grub, Fluxbox, Emacs..

terminal shortcuts usage:TAB

It is just one to just know it but another to know its perfect usage. I will try to cover its usages on my daily administration in this log. Any suggestion on the perfect or possible usage is welcome in the comments.

The most used would be the TAB auto-completion technique:

NOTE:: BACKSPACE to exit from the system manual pager.

Command completion:: If you want to find the list of any device information then you would look for ls(list) command. just type ls and press TAB twice.

You will get the short list of possible completion, try $lsusb for list of detected USB devices.

File-name/Directory completion:: You never have to write your complete file-name again. It will manage even if you are in a different directory. try looking for your wvdial.conf(/etc/wvdial.conf) file, easiest way- type $vim -v /e+TAB(2)+wv+TAB(2) ,you got through.

LOOKOUT:: TAB completion is smart enough to distinguish among a file to a directory. Use vim -v(or any editor) for file-names and  cd(or any directory related command)  for directories.

Environment Variable completion:: try $+TAB(2) for full list of variables. For anything particular or use it for digging deep into linux try some sequences like $PA+TAB(2) for $PATH

TUTorials::

Linux is easy on your task right?? It takes a sh** load of your job off… 😛

Conprehensive linuX terminal shortcuts

Improve Your interaction with the terminal by these: Command line shortcuts::

Ctrl+A – move to the start of the line (alternate HOME).
Ctrl+E – move to the end of the line( alternate END).

Ctrl+U – delete/cut from the cursor to the beginning of the line.
Ctrl+K – delete/cut from the cursor to the end of the line.
Ctrl+W – delete/cut from the cursor to the start of the word, space delimited (removes the last word in the command line, place cursor after the word).
Ctrl+Y – paste the cut from CTRL+U , CTRL+W, CTRL+K.

Ctrl+B – Moves the cursor backward one character (alternate: BACKWARD arrow).
Ctrl+F – moves one character forward (alternate: FORWARD arrow).
Ctrl+H – erases one character (alternate: BACKSPACE)

Ctrl+L – clears the terminal screen (alternate: clear).

Ctrl+G – sound the BELL

Ctrl+R – reverse search among your previous commands (use backspace to search again and ESC to quit action).

Ctrl+P – previous command (alternate: UP arrow).
Ctrl+N – next command (alternate: DOWN arrow).

Ctrl+Dlogout of current session (alternate: exit).
Ctrl+Cprocess interruption, halts the current command(safe quit).
Ctrl+Zstops the current command, resume with fg in the foreground or bg in the background (useful to stop the process and complete the work in the terminal and press fg).

^abc^xyz – replace first occurrence of ‘abc’ with ‘xyz’ in last command and execute it.
!! – repeat the last command.
!$ – substitute last argument of the command last used.(not last occurence of same)
~ – users HOME directory.
– previous working directory (usage:: #cd -).

CTRL+I/TABauto-completion based on the typed sequences (double click on TAB) for commands and Environment variables too

The following shortcuts will only work in terminal window, while all the previous will work in X window system also.

Shift+ pageUP – scroll terminal output UP.
Shift+ pageDOWN – scroll terminal output DOWN.

hopefully this will help YOU… Atleast It did ease my wrist pain ;-

Further reference::

  1. Rute’s command-line editing keys.
  2. Keyboard shortcuts for Xwindows and basic command line
  3. Learning the SHELL