Etape 2 - Les outils de base

Configuration de son écran par Grub

Nous allons configurer le lettrage de notre écran afin d'y pouvoir lire et écrire avec commodité.

Editons le fichier menu.lst

   # vim /boot/grub/menu.lst
   

Nous ajoutons à la ligne des kernel user et à celle de root cette indication vga=791, ainsi :

   kernel		/vmlinuz-2.6.26-2-amd64 root=/dev/sda6 ro quiet vga=791
   

Installation de VIm

VIm est un éditeur de fichier tout à fait remarquable, ne vous en privez pas !

Installer

   # aptitude install vim-nox vim-scripts exuberant-ctags

VIm par défaut

Placez vim-nox comme éditeur par défaut pour tous les utilisateurs du système :

   # update-alternatives --set editor /usr/bin/vim.nox
vim-nox est le nom du paquet (avec un tiret)
  • vim.nox (avec un point) est le binaire de l'application
  • vim est un lien symbolique vers vim.nox ainsi que editor.

Configuration de VIm

vim se configure dans le fichier /ect/vim/vimrc

Pour exemple, voici le mien :

" All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just                                                                                                                          
" /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :runtime
" you can find below.  If you wish to change any of those settings, you should
" do it in this file (/etc/vim/vimrc), since debian.vim will be overwritten
" everytime an upgrade of the vim packages is performed.  It is recommended to
" make changes after sourcing debian.vim since it alters the value of the
" 'compatible' option.

" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
 
" Uncomment the next line to make Vim more Vi-compatible
" NOTE: debian.vim sets 'nocompatible'.  Setting 'compatible' changes numerous
" options, so any other options should be set AFTER setting 'compatible'.
"set compatible

" Vim5 and later versions support syntax highlighting. Uncommenting the next
" line enables syntax highlighting by default.
syntax on

" If using a dark background within the editing area and syntax highlighting
" turn on this option as well
set background&

" Uncomment the following to have Vim jump to the last position when
" reopening a file
"if has("autocmd")
"  au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
"    \| exe "normal! g'\"" | endif
"endif

" Uncomment the following to have Vim load indentation rules and plugins
" according to the detected filetype.
"if has("autocmd")
"  filetype plugin indent on
"endif

" The following are commented out as they cause vim to behave a lot
" differently from regular Vi. They are highly recommended though.
"set showcmd            " Show (partial) command in status line.
"set showmatch          " Show matching brackets.
"set ignorecase         " Do case insensitive matching
"set smartcase          " Do smart case matching
"set incsearch          " Incremental search
"set autowrite          " Automatically save before commands like :next and :make
"set hidden             " Hide buffers when they are abandoned
"set mouse=a            " Enable mouse usage (all modes) in terminals
set number              " Numérotation des lignes
set cursorline          " Met la ligne courante en gris
highlight CursorLine ctermbg=grey

" Source a global configuration file if available
" XXX Deprecated, please move your changes here in /etc/vim/vimrc
if filereadable("/etc/vim/vimrc.local")
  source /etc/vim/vimrc.local
endif

Il en est de multiples exemples bien plus élaborés qu'ici… A vos recherches !

Installation de MC (midnight commander)

mc est un gestionnaire de fichiers en ligne de commande.

   # aptitude install mc
Note :

mc possède son propre éditeur :

   $ mcedit

Mais à quoi bon que vim se décarcasse ? ;-)

Gestion des priorités - le fichier Preferences

  • Créez et éditez le fichier des preferences :
   # vim /etc/apt/preferences
  • Et écrivez :
Package: *
Pin: release o=Debian,a=stable
Pin-priority: 900

Package: *
Pin: release o=Unofficial Multimedia Packages,a=stable
Pin-priority: 200

Package: *
Pin: release o=Backports.org archive,a=lenny-backports
Pin-priority: 200

Les priorités peuvent être vérifiées avec la commande :

# apt-cache policy

Configurations des premiers outils

Complétion avec bash

Installation

Installer les paquets nécessaires :

 $ sudo aptitude install bash-completion

Configuration

Editez le fichier bash.bashrc

 # vim /etc/bash.bashrc

Les lignes suivantes ne doivent pas être commentées :

if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

Outils d'applications en ligne de commande

Ici, je vous propose quelques installation d'outils purement en ligne de commande.

Internet - lynx

   # aptitude install lynx

Utilisation :

Pour se connecter à une url :

  $ lynx votre_url

Pour naviguer vers une url différente :

  g votre_url_différente

g pour = go ! ;)

à suivre…

Internet - Weechat

Weechat est une application en ligne permettant de s'inscrire sur les chan d'entraide de votre choix.

Irc, mon amour…

Installation Weechat :

   # aptitude install weechat
   

Configuration et utilisation Weechat :

Pour sa configuration et son utilisation, je vous renvoie à ce site :
http://wiki.debian-facile.org/logiciel:weechat

Internet - pastebinit

Pastebinit est un outil pour créer le résultat d'une commande en ligne dans le site pastebin qui vous donnera une url à transmettre pour en indiquer le libellé.
Pastebiner sert à donner des indications afin de les partager ou de recevoir une aide via la toile.

Attention ! N'y posez pas de renseignements sensibles sans les modifier au préalable.

Installation :

  # aptitude install pastebinit
  

Utilisation :

  $ pastebinit /etc/fstab
  

Donnera directement une url où sera porté le libellé de votre fichier fstab

Pour un fichier sensible où vous devez porter des modifications afin de maquiller des informations reseau ou de passwd, vous tapez et envoyez dans votre navigateur :

   http://pastebin.com

Et vous collez dans la fenêtre ouverte le texte du fichier que vous avez modifié afin de l'envoyer sans danger.

Pour une commande utilisant le mot de passe root, sans passer totalement en root, vous pouvez tapez :

  $ su -c 'fdisk-l | pastebinit -'

Notes :

  • utilisation du caractère pipe (|) afin de renvoyer la commande fdisk vers une seconde commande sans intermédiaire ni détail.
  • utilisation de l'option tiret (-) à la fin de la commande pastebinit pour l'initialiser (voir le man pastebinit)

Configurer - Installer le son et le graphisme Passer à l'étape 3 suivante.

debian/etape_2_installation_base.txt · Dernière modification : 2010/01/17 19:25 de smolski
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0