hallo
ich würde gerne wissen wie ich das auch auf meinem system zum laufen bekomme...
wenn ich z.B. ls mache das ich die ordner und datein in einer anderen farbe sehe.. wie mache ich das?
gruß silver
hallo
ich würde gerne wissen wie ich das auch auf meinem system zum laufen bekomme...
wenn ich z.B. ls mache das ich die ordner und datein in einer anderen farbe sehe.. wie mache ich das?
gruß silver
Moin,
Indem du dir ein alias definierst, das "ls" nennst und dann in Wirklichkeit "ls --color=tty" damit aufrufst; also mit so einer Zeile in deiner .bash_profile oder sonst so ner Datei, die beim Login abgearbeitet wird:
GrussCode:alias ls='ls --color=tty'
WK
Das ist aber zu viel zum Lesen und ich will, dass er einfach kompeliert!
ddanke,
hm der befehl ansich geht bis zum nächsten login.. logisch.. wenn ich ihn, ganz unten, in die datei eintrage /home/user/.bash_profile eintrage geht es trotzdem nicht
verwendest du zufaellt xterm? dieser liest nicht die ~/.bash_profile ein, nimm ~/.bashrc
hatte ich auch schon versucht.. hab nen rootserver.. läd der die beim userswitchen auch? denke mal oder?
Hi!
Bei "su" wird die .bashrc ausgelesen, bei "su -" die .bash_profile.Zitat von SilverIC3
Gruß
fuffy
Shuttle SN95G5V2 | Athlon 64 3000+ | 1 GiB RAM | SAMSUNG HD501LJ | LG GSA-4167B | SkyStar 2
Vaio VGN-SZ4XWN/C
Linux 2.6 | GNOME 2.22 | VDR 1.6
geht immer noch net.. ich trage den befehl einfach ganz unten ein in die datei
also du sprichst vom root server richtig? bist also per ssh auf der maschine?!
dann fuege die zeile am ende von ~/.bashrc an, gib bei deiner ssh session in die konsole bash ein und guck obs geht, wenn net zeig ma output von alias und was jetz in deiner ~/.bashrc steht
richtig
hier die bashrc
und den outout von alias ?!?!Code:# ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If running interactively, then: if [ "$PS1" ]; then # don't put duplicate lines in the history. See bash(1) for more options # export HISTCONTROL=ignoredups # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. #shopt -s checkwinsize # enable color support of ls and also add handy aliases if [ "$TERM" != "dumb" ]; then eval `dircolors -b` alias ls='ls --color=auto' #alias dir='ls --color=auto --format=vertical' #alias vdir='ls --color=auto --format=long' fi # some more ls aliases #alias ll='ls -l' #alias la='ls -A' #alias l='ls -CF' # set a fancy prompt PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' # If this is an xterm set the title to user@host:dir case $TERM in xterm*) PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' ;; *) ;; esac # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc). #if [ -f /etc/bash_completion ]; then # . /etc/bash_completion #fi fi alias ls='ls --color=tty'
setz den alias mal so
alias ls='ls --color=auto'
und mach wie oben beschrieben und gucks obs geht, wenn nicht output von alias posten
Also ich habs nich alles gelesen jetz sry, aber ich hatte das gleiche "Problem" etwas mehr Farbe auf der Konsole haben zu wollen, jemand sagte mir, dass er einfach versch Files durch die von Gentoo ersetzt hat. Ich hab die nun auch. Die kannste nochn Bisschen anpassen, wie Du das brauchst (alias optionen einfuegen, ergaenzen, etc) aber die machen Dein leben bunter...
Wenn die hinhauen bei Dir brauchste ne Sonnenbrille, is sehr farbig, hehehe
.bashrc von user
Code:# ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # 077 would be more secure, but 022 is generally quite realistic umask 022 if [ `/usr/bin/whoami` = 'root' ] then # Do not set PS1 for dumb terminals if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ] then export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]' fi export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}" else # Do not set PS1 for dumb terminals if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ] then export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]' fi export PATH=".:/bin:/usr/bin:${PATH}" fi unset ROOTPATH if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] then export INPUTRC="/etc/inputrc" fi # Extract the value of EDITOR [ -z "$EDITOR" ] && EDITOR="`. /etc/rc.conf 2>/dev/null; echo $EDITOR`" [ -z "$EDITOR" ] && EDITOR="`. /etc/conf.d/basic 2>/dev/null; echo $EDITOR`" [ -z "$EDITOR" ] && EDITOR="/bin/nano" export EDITOR alias nano="nano -w" alias ls="ls --color -F" alias la="ls -la --color -F"
.bash_profile von user
Code:# ~/.bash_profile: executed by bash(1) for login shells. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/login.defs #umask 022 # include .bashrc if it exists if [ -f ~/.bashrc ]; then . ~/.bashrc fi # the rest of this file is commented out. # set PATH so it includes user's private bin if it exists #if [ -d ~/bin ] ; then # PATH=~/bin:"${PATH}" #fi
/etc/profile
Code:# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" #if [ "$PS1" ]; then # if [ "$BASH" ]; then # PS1='\u@\h:\w\$ ' # else # if [ "`id -u`" -eq 0 ]; then # PS1='# ' # else # PS1='$ ' # fi # fi #fi if [ `/usr/bin/whoami` = 'root' ] then # Do not set PS1 for dumb terminals if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ] then export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]' fi export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:${ROOTPATH}" else # Do not set PS1 for dumb terminals if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ] then export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]' fi export PATH="/bin:/usr/bin:/usr/local/bin:${PATH}" fi unset ROOTPATH export PATH umask 022
.bashrc von root
Code:# ~/.bashrc: executed by bash(1) for non-login shells. export PS1='\h:\w\$ ' umask 022 # You may uncomment the following lines if you want `ls' to be colorized: export LS_OPTIONS='--color=auto' eval `dircolors` alias ls='ls $LS_OPTIONS' alias ll='ls $LS_OPTIONS -l' alias la='ls $LS_OPTIONS -la' # # Some more alias to avoid making mistakes: alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' source /etc/profile
.profile von root
Quelle:Code:# ~/.profile: executed by Bourne-compatible login shells. if [ -f ~/.bashrc ]; then . ~/.bashrc fi PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 export PATH mesg n
http://www.debianforum.de/forum/view...808&highlight=
Sucu Sucu is most complicated. If you comprende Sucu Sucu, you can feel it. But if you don't have Sucu Sucu, it is nothing!
wenn debianer gentoo files benutzen isses ja schon weit gekommen : D
ich bin dumm - ich bin anfaenger - ich darf das, hahahaha
Sucu Sucu is most complicated. If you comprende Sucu Sucu, you can feel it. But if you don't have Sucu Sucu, it is nothing!
hmm
hier dann nun die /etc/profileCode:login as: root Password: Last login: Mon Apr 11 08:00:23 2005 from 141.44.183.8 -bash: /etc/profile: line 37: syntax error: unexpected end of file -bash: /etc/profile: line 37: syntax error: unexpected end of file debian:~#
????????????Code:# /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games" #if [ "$PS1" ]; then # if [ "$BASH" ]; then # PS1='\u@\h:\w\$ ' #else # if [ "`id -u`" -eq 0 ]; then # PS1='# ' # else # PS1='$ ' # fi #fi #fi if [ `/usr/bin/whoami` = 'root' ] then # Do not set PS1 for dumb terminals if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ] then export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]' export PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:${ROOTPATH}" else # Do not set PS1 for dumb terminals if [ "$TERM" != 'dumb' ] && [ -n "$BASH" ] then export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]' fi export PATH="/bin:/usr/bin:/usr/local/bin:${PATH}" fi unset ROOTPATH export PATH umask 022
Moin,
Ich hab' jetzt die Zeilen nicht gezaehlt, aber aufn ersten Blick sieht das fuer mich so aus, als haettest du 1-2 fi vergessen. Zu jedem if gehoert auch ein fi, das die if Anweisung beendet. Guck' nochmal von da wo du's herhast - da muessten die fi ja noch drinnensein...
Gruss
WK
Das ist aber zu viel zum Lesen und ich will, dass er einfach kompeliert!
Lesezeichen