[Debian / SSH] Kleuren bij folders / executables / etc

Pagina: 1
Acties:

  • m33p
  • Registratie: September 2002
  • Laatst online: 06-02 20:21
De meesten kennen het wel; standaard heb je bij onder andere suse en redhad dat mappen blauw gekleurd zijn, executables rood ofzo, symlinks groen .. (precies weet ik het niet). Bij Debian is dit standaard niet. Ik heb al lopen zoeken over hoe ik dit aan kan zetten maar ik kan het nergens vinden. Is dit uberhaupt mogelijk, en zo ja, hoe?

Alvast bedankt

  • BCC
  • Registratie: Juli 2000
  • Laatst online: 21:23

BCC

Om het system-wide te doen, moet je het volgende aanpassen:
/etc/bash.bashrc

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# System-wide .bashrc file for interactive bash(1) shells.

# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.

# If not running interactively, don't do anything

[ -z "$PS1" ] && return



# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" -a -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

# set a fancy prompt (non-color)
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

  if [ "$BASH" ]; then
     if [[ ${EUID} == 0 ]] ; then
        PS1='\\[\033[01;31m\]\u@\h \\[\033[01;34m\]\w \$ \\[\033[00m\]'
     else
        PS1='\\[\033[01;32m\]\u@\h \\[\033[01;34m\]\w \$ \\[\033[00m\]'
     fi
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi

export LS_OPTIONS='--color=auto'
eval "`dircolors`"
alias ls='ls $LS_OPTIONS -F'
alias ll='ls $LS_OPTIONS -lF'
alias l='ls $LS_OPTIONS -lAF'

Let wel: Dit is Ubuntu. En je moet misschien even je .bashrc uit je homedir weggooien voordat het werkt.

[ Voor 120% gewijzigd door BCC op 31-01-2006 09:41 ]

Na betaling van een licentievergoeding van €1.000 verkrijgen bedrijven het recht om deze post te gebruiken voor het trainen van artificiële intelligentiesystemen.


  • JeRa
  • Registratie: Juni 2003
  • Laatst online: 30-04-2025
Voeg het volgende toe aan ~/.bashrc of in /etc/profile:
code:
1
alias ls="ls --color=auto"

Et voila :)

  • daft_dutch
  • Registratie: December 2003
  • Laatst online: 02-12-2025

daft_dutch

>.< >.< >.< >.<

JeRa schreef op dinsdag 31 januari 2006 @ 09:35:
Voeg het volgende toe aan ~/.bashrc of in /etc/profile:
code:
1
alias ls="ls --color=auto"

Et voila :)
unquote in ~/.bashrc ^^

>.< >.< >.< >.<