===== Fichier .bashrc minimal ===== # # This file contains an example of default settings that can be made for # bash(1) users on this system. To make these settings the default for system # users, you will need to copy it to /etc/bash/bashrc # # Bourne Again SHell init file. # umask 022 # Where's the Gnu stuff at? #GNU=/usr/gnu/bin #X11=/usr/X11/bin #UTIL_PATH=$GNU:$X11 #STANDARD_PATH=/bin:/usr/bin:/sbin:/usr/sbin #if [ -d $HOME/bin ]; then # MY_PATH=$MY_PATH:$HOME/bin #fi #export PATH="$MY_PATH:$UTIL_PATH:$STANDARD_PATH" # If not running interactively, then return if [ -z "$PS1" ]; then return fi # Set ignoreeof if you don't want EOF as the sole input to the shell to # immediately signal a quit condition. This only happens at the start # of a line if the line is empty, and you haven't just deleted a character # with C-d. I turn this on in ~/.bash_profile so that only login shells # have the right to be obnoxious. set -o ignoreeof # Set auto_resume if you want to resume on "emacs", as well as on # "%emacs". auto_resume=exact # Set notify if you want to be asynchronously notified about background # job completion. set -o notify # Make it so that failed `exec' commands don't flush this shell. shopt -s execfail if [ -z "$LOGIN_SHELL" ]; then PS1="[\u@\h]:[\#]:[\w]:\$ " fi #HISTSIZE=256 MAILCHECK=60 # # we want pretty colored file listings # if [ -x /usr/bin/dircolors ] ; then if [ -f ~/.dir_colors ] ; then eval "`/usr/bin/dircolors -b ~/.dir_colors`" elif [ -f ~/.dircolors ] ; then eval "`/usr/bin/dircolors -b ~/.dircolors`" fi fi [ -f /etc/bash/bash_completion ] && . /etc/bash/bash_completion for s in /etc/bash/*.sh ; do test -r $s && . $s done for s in /etc/bash/*.bash ; do test -r $s && . $s done [ -f ~/.bash_expert ] && . ~/.bash_expert [ -f ~/.bash_aliases ] && . ~/.bash_aliases ################## ## Ajouts Perso ## ################## ## Variables perso ## export EDITOR="/usr/pkg/bin/vim" export PAGER="/usr/bin/less" #export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R7/bin:/usr/X11R6/bin:/usr/games:~/bin #export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R7/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin #export PATH=$PATH:/sbin:/usr/sbin:/usr/pkg/sbin:/usr/local/sbin:/usr/games:/usr/X11R7/bin:/home/$USER/.bin:/home/$USER/.local/bin #export PATH=$PATH:/usr/X11R7/bin:/home/$USER/.bin/busybox #export LANG=fr_FR.UTF-8 export LANG=fr_FR.ISO8859-1 #export LSCOLORS="gxfxcxdxbxegedabagacad" ##priorit� utilitaire gnu #export PATH=/usr/pkg/gnu/bin:$PATH:/home/$USER/.bin/busybox # Invite de commandes personnalisée pour user et root #debian #VERT='\[\033[0;32m\]' #ROUGE='\[\033[0;33m\]' #BLANC='\[\033[1;37m\]' #NC='\[\033[0m\]' #if [[ ${EUID} == 0 ]] ; then # PS1="$ROUGE[$BLANC\u$NC@$BLANC\h$NC:$BLANC\w$ROUGE]#$NC" #else # PS1="$VERT[$BLANC\u$NC@$BLANC\h$NC:$BLANC\w$VERT]\$$NC" #fi #ubuntu if [[ ${EUID} == 0 ]] ; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' else PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' fi # Perso #if [[ ${EUID} == 0 ]] ; then # PS1="\[\033[38;5;1m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\[$(tput sgr0)\]\[\033[38;5;33m\]\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;228m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]\\$\[$(tput sgr0)\]" #else # PS1="\[\033[38;5;10m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\[$(tput sgr0)\]\[\033[38;5;33m\]\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;228m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]\\$\[$(tput sgr0)\]" #fi ## prompt bash personnel pour NetBSD ## if [[ ${EUID} == 0 ]] ; then PS1='\[\e[38;5;160m\]\u\[\e[0m\]@\[\e[96m\]\h\[\e[0m\]: \w \[\e[38;5;160m\]#\[\e[0m\] ' else PS1='\[\e[38;5;33m\]\u\[\e[0m\]@\[\e[96m\]\h\[\e[0m\]: \w \[\e[38;5;33m\]\\$\[\e[0m\] ' fi ## fin prompt bash personnel pour NetBSD ## ## Bash completion if ! shopt -oq posix; then if [ -f /usr/pkg/share/bash-completion/bash_completion ]; then . /usr/pkg/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi ## Alias perso ## # Bash aliases if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi alias ls='colorls -FGA' #alias ls='ls -F' alias la='ls -A' alias ll='ls -l' alias lla='ls -Al' #alias l='ls -CF' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' alias wi='which' alias wr='whereis' alias h='history' #alias vi='vim' alias pkg='pkgin' alias mount_ext2fs='mount -t ext2fs' alias ntpdate-default='/usr/sbin/ntpdate 0.fr.pool.ntp.org' alias pingbsd='ping www.bsd.org' alias pinggoogle='ping www.google.fr' alias ftpdstart='service ftpd onestart' alias ftpdstop='service ftpd onestop' alias ftpdrun='/usr/libexec/ftpd -ll -D' alias ftpdkill='pkill ftpd' alias httpdstart='service httpd onestart' alias httpdstop='service httpd onestop' alias httpdrun='/usr/libexec/httpd -U _httpd -b /var/www' alias httpdkill='pkill httpd' alias wgetippub="wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1" alias netstattcpudp='netstat -an | grep -v stream | grep -v dgram' #alias telnetdstart='/usr/libexec/telnetd -a valid' #alias ddliveusb='dd if=image.iso of=/dev/sda bs=1M conv=sync' ## Creer un live USB #alias pkgin# #alias pkglist='pkgin list' #alias pkginstall='pkgin intall' #alias pkgupdate='pkgin update' #alias pkgremove='pkgin remove' #alias pkgupgrade='pkgin upgrade' #alias pkgfullupgrade='pkgin fullupgrade' #alias pkgsearch='pkgin search' #alias pkgclean='pkgin clean' #alias pkgautoremove='pkgin autoremove' #alias pkgstats='pkgin stats' ## Divers ## # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth # append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize ===== Fichier .bashrc avec commande GNU Coreutils ===== # # This file contains an example of default settings that can be made for # bash(1) users on this system. To make these settings the default for system # users, you will need to copy it to /etc/bash/bashrc # # Bourne Again SHell init file. # umask 022 # Where's the Gnu stuff at? #GNU=/usr/gnu/bin #X11=/usr/X11/bin #UTIL_PATH=$GNU:$X11 #STANDARD_PATH=/bin:/usr/bin:/sbin:/usr/sbin #if [ -d $HOME/bin ]; then # MY_PATH=$MY_PATH:$HOME/bin #fi #export PATH="$MY_PATH:$UTIL_PATH:$STANDARD_PATH" # If not running interactively, then return if [ -z "$PS1" ]; then return fi # Set ignoreeof if you don't want EOF as the sole input to the shell to # immediately signal a quit condition. This only happens at the start # of a line if the line is empty, and you haven't just deleted a character # with C-d. I turn this on in ~/.bash_profile so that only login shells # have the right to be obnoxious. set -o ignoreeof # Set auto_resume if you want to resume on "emacs", as well as on # "%emacs". auto_resume=exact # Set notify if you want to be asynchronously notified about background # job completion. set -o notify # Make it so that failed `exec' commands don't flush this shell. shopt -s execfail if [ -z "$LOGIN_SHELL" ]; then PS1="[\u@\h]:[\#]:[\w]:\$ " fi #HISTSIZE=256 MAILCHECK=60 # # we want pretty colored file listings # if [ -x /usr/bin/dircolors ] ; then if [ -f ~/.dir_colors ] ; then eval "`/usr/bin/dircolors -b ~/.dir_colors`" elif [ -f ~/.dircolors ] ; then eval "`/usr/bin/dircolors -b ~/.dircolors`" fi fi [ -f /etc/bash/bash_completion ] && . /etc/bash/bash_completion for s in /etc/bash/*.sh ; do test -r $s && . $s done for s in /etc/bash/*.bash ; do test -r $s && . $s done [ -f ~/.bash_expert ] && . ~/.bash_expert [ -f ~/.bash_aliases ] && . ~/.bash_aliases ################## ## Ajouts Perso ## ################## ## Variables perso ## export EDITOR="/usr/pkg/bin/vim" export PAGER="/usr/bin/less" #export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R7/bin:/usr/X11R6/bin:/usr/games:~/bin #export PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/pkg/sbin:/usr/pkg/bin:/usr/X11R7/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin #export PATH=$PATH:/sbin:/usr/sbin:/usr/pkg/sbin:/usr/local/sbin:/usr/games:/usr/X11R7/bin:/home/$USER/.bin:/home/$USER/.local/bin #export PATH=$PATH:/usr/X11R7/bin:/home/$USER/.bin/busybox #export LANG=fr_FR.UTF-8 export LANG=fr_FR.ISO8859-1 #export LSCOLORS="gxfxcxdxbxegedabagacad" ##priorit� utilitaire gnu #export PATH=/usr/pkg/gnu/bin:$PATH:/home/$USER/.bin/busybox # Invite de commandes personnalisée pour user et root #debian #VERT='\[\033[0;32m\]' #ROUGE='\[\033[0;33m\]' #BLANC='\[\033[1;37m\]' #NC='\[\033[0m\]' #if [[ ${EUID} == 0 ]] ; then # PS1="$ROUGE[$BLANC\u$NC@$BLANC\h$NC:$BLANC\w$ROUGE]#$NC" #else # PS1="$VERT[$BLANC\u$NC@$BLANC\h$NC:$BLANC\w$VERT]\$$NC" #fi #ubuntu if [[ ${EUID} == 0 ]] ; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' else PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] ' fi # Perso #if [[ ${EUID} == 0 ]] ; then # PS1="\[\033[38;5;1m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\[$(tput sgr0)\]\[\033[38;5;33m\]\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;228m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]\\$\[$(tput sgr0)\]" #else # PS1="\[\033[38;5;10m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\[$(tput sgr0)\]\[\033[38;5;33m\]\h\[$(tput sgr0)\]\[\033[38;5;15m\]:\[$(tput sgr0)\]\[\033[38;5;228m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]\\$\[$(tput sgr0)\]" #fi ## prompt bash personnel pour NetBSD ## if [[ ${EUID} == 0 ]] ; then PS1='\[\e[38;5;160m\]\u\[\e[0m\]@\[\e[96m\]\h\[\e[0m\]: \w \[\e[38;5;160m\]#\[\e[0m\] ' else PS1='\[\e[38;5;33m\]\u\[\e[0m\]@\[\e[96m\]\h\[\e[0m\]: \w \[\e[38;5;33m\]\\$\[\e[0m\] ' fi ## fin prompt bash personnel pour NetBSD ## ## Bash completion if ! shopt -oq posix; then if [ -f /usr/pkg/share/bash-completion/bash_completion ]; then . /usr/pkg/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi ## Alias perso ## # Bash aliases if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi alias ls='colorls -FGA' #alias ls='ls -F' #alias ls='gls --color=auto -F' alias gls='gls --color=auto -F -A' alias gla='gls -A' alias gll='gls -l' alias glla='gls -Al' #alias gls='gls --color=auto' alias gdir='gdir --color=auto' alias gvdir='gvdir --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' alias la='ls -A' alias ll='ls -l' alias lla='ls -Al' #alias l='ls -CF' alias wi='which' alias wr='whereis' alias h='history' #alias vi='vim' alias pkg='pkgin' alias mount_ext2fs='mount -t ext2fs' alias ntpdate-default='/usr/sbin/ntpdate 0.fr.pool.ntp.org' alias pingbsd='ping www.bsd.org' alias pinggoogle='ping www.google.fr' alias ftpdstart='service ftpd onestart' alias ftpdstop='service ftpd onestop' alias ftpdrun='/usr/libexec/ftpd -ll -D' alias ftpdkill='pkill ftpd' alias httpdstart='service httpd onestart' alias httpdstop='service httpd onestop' alias httpdrun='/usr/libexec/httpd -U _httpd -b /var/www' alias httpdkill='pkill httpd' alias wgetippub="wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d: -f 2 | cut -d\< -f 1" alias netstattcpudp='netstat -an | grep -v stream | grep -v dgram' #alias telnetdstart='/usr/libexec/telnetd -a valid' #alias ddliveusb='dd if=image.iso of=/dev/sda bs=1M conv=sync' ## Creer un live USB #alias pkgin# #alias pkglist='pkgin list' #alias pkginstall='pkgin intall' #alias pkgupdate='pkgin update' #alias pkgremove='pkgin remove' #alias pkgupgrade='pkgin upgrade' #alias pkgfullupgrade='pkgin fullupgrade' #alias pkgsearch='pkgin search' #alias pkgclean='pkgin clean' #alias pkgautoremove='pkgin autoremove' #alias pkgstats='pkgin stats' #commande linux coreutils# #alias chgrp='gchgrp' #alias chmod='gchmod' #alias chown="gchown' #alias chroot='gchroot' #alias cp='gcp' #alias cut='gcut' #alias date='gdate' #alias dd='gdd' #alias df='gdf' #alias dialog='gdialog' #alias dir='gdir' #alias du='gdu' #alias env='genv' #alias groupsg='groups' #alias head='ghead' #alias hostid='ghostid' #alias id='gid' #alias join='gjoin' #alias kill='gkill' #alias link='glink' #alias ln='gln' #alias logname='glogname' #alias ls='gls' #alias make='gmake' #alias md5sum='gmd5sum' #alias mkdir='gmkdir' #alias mkfifo='gmkfifo' #alias mknod='gmknod' #alias mv='gmv' #alias nice='gnice' #alias nl='gnl' #alias nohup='gnohup' #alias paste='gpaste' #alias printenv='gprintenv' #alias printf='gprintf' #alias pwd='gpwd' #alias rm='grm' #alias rmdir='grmdir' #alias sha1sum='gsha1sum' #alias sha224sum='gsha224sum' #alias sha256sum='gsha256sum' #alias sha384sum='gsha384sum' #alias sha512sum='gsha512sum' #alias shred='gshred' #alias sleep='gsleep' #alias sort='gsort' #alias split='gsplit' #alias sync='gsync' #alias tac='gtac' #alias tail='gtail' #alias tar='gtar' #alias touch='gtouch' #alias tr='gtr' #alias truncate='gtruncate' #alias tsort='gtsort' #alias tty='gtty' #alias uname='guname' #alias uniq='guniq' #alias unlink='gunlink' #alias uptime='guptime' #alias users='gusers' #alias vdir='gvdir' #alias vim='gvim' #alias vimdiff='gvimdiff' #alias vimtutor='gvimtutor' #alias wc='gwc' #alias who='gwho' #alias whoami='gwhoami' #alias yes='gyes' #alias zcat='gzcat' ## Divers ## # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth # append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize