Using the .inputrc file to control keybindings in xterm. 

Using the .inputrc file to control keybindings in xterm.

If you wish to control the key bindings for Backspace, Delete, Home & the End keys in Xterm then read on.

The ~/.inputrc file in your home directory controls this behavior, using the defines in this file you may control the key bindings and make using the BASH shell easier.

$if term=linux
 "\e[1~": beginning-of-line
 "\e[4~": end-of-line
 "\e[3~": delete-char
 "\e[H": beginning-of-line
 "\e[F": end-of-line
 "\C-?": delete-char

The TERM environment variable determines whether the Linux console or the Xterm terminal emulator is affected by this definition. If the Xterm does not use the Backspace key as backspace, then you may enter this into your ~/.bashrc file to configure this: stty erase ^H.

Enabling color ls output.

Using a simple alias, you may enable color directory listing output with ls. This directory listing also enables a human-readable listing of file-sizes with the -h option.

alias ls=’ls -hula –color=auto’

The .dircolors file that resides in your home directory controls the colors that are used to represent various files displayed in the directory listing.

Viewing files with the command-line.

To view a text file and scroll through the text file easily, then the less command will help.

cat myfile.txt | less