Benutzer-Werkzeuge

Webseiten-Werkzeuge


linux:grundkonfiguration

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
linux:grundkonfiguration [2010-01-18 11:31]
127.0.0.1 Externe Bearbeitung
linux:grundkonfiguration [2014-04-05 11:42] (aktuell)
Zeile 6: Zeile 6:
   * ''​~/​bin''​ anlegen für eigene Scripts   * ''​~/​bin''​ anlegen für eigene Scripts
   * Nützliche Pakete ​   * Nützliche Pakete ​
-    * <code bash>​apt-get install bzip2 unzip less patch traceroute ssh vim locate</​code>​+    * <code bash>​apt-get install bzip2 unzip less patch traceroute ssh vim locate ​dnsutils host telnet lynx wget make</​code>​
   * Zeiten für automatische Scripts in ''/​etc/​crontab''​ anpassen   * Zeiten für automatische Scripts in ''/​etc/​crontab''​ anpassen
 +
 +===== Tipps =====
 +  * If you just typed in a really long, complicated command and managed to mess it up, you can use fc (fix command) to load said command in your default editor.
 +  * Ctrl + A – jump to the beginning of the line 
 +  * Ctrl + E – jump to the end of the line 
 +  * Ctrl + U – clear the line 
 +  * Ctrl + L – clear the screen ​
 +  * Ctrl + W – delete last word 
 +  * Ctrl + K – delete to the end of the line 
 +  * Alt + T – swap current word with previous (also Esc, T) 
 +  * Alt + F – jump one word forward (also Esc, F) 
 +  * Alt + B – jump one word backward (also Esc, B) 
 +  * Alt + U – uppercase till the end of line (also Esc, U) 
 +  * Alt + u – lowercase till the end of line (also Esc, u) 
 +  * Alt +. – insert last argument (also Esc, .) 
 +  * Ctrl + R – reverse incremental history search ​
 +  * Ctrl + X, Ctrl + E – open default text editor to edit a command ​
  
 ===== ~/.bashrc ===== ===== ~/.bashrc =====
Zeile 22: Zeile 39:
  
 alias vi='​vim' ​                       # immer vim nutzen alias vi='​vim' ​                       # immer vim nutzen
-alias cdsrc='​cd /​usr/​local/​src'</​code>​+alias cdsrc='​cd /​usr/​local/​src'​ 
 + 
 +bash -c "echo -ne '​\033]0;​`hostname`\007'"​ # send hostname to PuTTY 
 + 
 +# save all the histories  
 +export HISTFILESIZE = 1000000  
 +export HISTSIZE = 1000000 
 + 
 +# don't put duplicate lines or empty spaces in the history  
 +export HISTCONTROL=ignoreboth  
 +# combine multiline commands in history  
 +shopt -s cmdhist 
 +# merge session histories  
 +shopt -s histappend 
 + 
 +# enable colors  
 +eval "​`dircolors -b`"  
 +# force ls to always use color and type indicators  
 +alias ls ='ls -hF --color=auto'​  
 +# make the dir command work kinda like in windows (long format)  
 +alias dir ='ls --color=auto --format =long'  
 +# make grep highlight results using color  
 +export GREP_OPTIONS ='​--color=auto'​  
 +# colorful man pages  
 +export LESS_TERMCAP_mb=$'​\E[01;​31m'​  
 +export LESS_TERMCAP_md=$'​\E[01;​31m'​  
 +export LESS_TERMCAP_me=$'​\E[0m'​  
 +export LESS_TERMCAP_se=$'​\E[0m'​  
 +# end the info box  
 +export LESS_TERMCAP_so=$'​\E[01;​42;​30m'​  
 +# begin the info box  
 +export LESS_TERMCAP_ue=$'​\E[0m'​  
 +export LESS_TERMCAP_us =$'​\E[01;​32m'​ 
 + 
 +# use colordiff instead of diff if available  
 +command -v colordiff >/​dev/​null 2 >&1 && alias diff="​colordiff -u"  
 +# use htop instead of top if installed  
 +command -v htop >/​dev/​null 2 >&1 && alias top=htop 
 +</​code>​
  
 ===== Vim ===== ===== Vim =====
Zeile 52: Zeile 107:
 set ruler              " show the cursor position all the time set ruler              " show the cursor position all the time
 set nopaste set nopaste
 +set pastetoggle=<​F2>​
  
 " Suffixes that get lower priority when doing tab completion for filenames. " Suffixes that get lower priority when doing tab completion for filenames.
Zeile 86: Zeile 142:
 "set hidden ​        "​ Hide buffers when they are abandoned "set hidden ​        "​ Hide buffers when they are abandoned
 "set mouse=a ​       " Enable mouse usage (all modes) in terminals "set mouse=a ​       " Enable mouse usage (all modes) in terminals
 +set hlsearch
  
 " Konfiguration für Syntax Highlighting => HTML " Konfiguration für Syntax Highlighting => HTML
Zeile 93: Zeile 150:
  
 ===== logrotate ===== ===== logrotate =====
-todo +Meine Logfiles werden mit //​logrotate//​ wöchentlich gesichert und zwar in das Verzeichnis eines hierfür angelegten FTP-Benutzers. So kann ich die Logs regelmäßig auf meinem Heim-PC sichern. ​ 
 +Eine Konfigurationsdatei für logrotate für die Systemmeldungen sieht z.B. so aus: 
 +<code ini> 
 +/​var/​log/​syslog 
 +/​var/​log/​messages { 
 +        olddir /​home/​ftp/​backup/​logs/​syslog 
 +        weekly 
 +        missingok 
 +        rotate 52 
 +        compress 
 +        delaycompress 
 +        notifempty 
 +        create 700 ftpuser ftpusers 
 +        sharedscripts 
 +
 +</​code>​
linux/grundkonfiguration.1263810680.txt.gz · Zuletzt geändert: 2014-04-05 11:42 (Externe Bearbeitung)