Користувальницькькі налаштування

Налаштування сайту


software:os:linux:shell:setup

Розбіжності

Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.

Посилання на цей список змін

Порівняння попередніх версій Попередня ревізія
Наступна ревізія
Попередня ревізія
software:os:linux:shell:setup [2020/01/31 15:56]
charon
software:os:linux:shell:setup [2020/02/03 17:02] (поточний)
charon [Створити ~/.ssh/config]
Рядок 88: Рядок 88:
 export HISTSIZE=1000 export HISTSIZE=1000
 export HISTTIMEFORMAT="%t%d.%m.%y %H:%M:%S%t" export HISTTIMEFORMAT="%t%d.%m.%y %H:%M:%S%t"
 +</code>
 +
 +===== Створити ~/.bash_aliases =====
 +<code>
 +unalias ls
 +alias ls="/bin/ls --color=never -F --group-directories-first"
 +alias dir="ls -a"
 +alias l="ls -la"
 +alias cw="clear; w"
 +alias x="exit"
 +alias cls="clear"
 +alias bc="bc -ql"
 +alias tt=traceroute
 +
 +# Open last modified file in vim (not checked!)
 +alias Vim="vim `ls -t | head -1`"
 +
 +# Find top 5 big files
 +alias findbig="find . -type f -exec ls -s {} \; | sort -n -r | head -5"
 +
 +# To clear all the history and screen
 +alias hcl='history -c; clear'
 +
 +# Make basic commands verbose
 +alias cp="cp -v"
 +alias rm="rm -v"
 +alias mv="mv -v"
 +
 +# To navigate to the different directories
 +alias ..='cd ..'
 +alias ...='cd ../..'
 +
 +# Create and change to a new directory
 +mcd ()
 +{
 +   if [ "$1" == "" ]; then
 +       echo "mcd directory-name";
 +   else
 +       if [ ! -d $1 ]; then
 +           mkdir $1;
 +           cd $1;
 +       else
 +           echo "$1 directory exists";
 +       fi;
 +   fi
 +}
 +# display currently mounted file systems nicely
 +showmounted() { (echo "DEVICE PATH TYPE FLAGS" && mount | awk '$2=$4="";1') | column -t; }
 +</code>
 +
 +
 +===== Створити ~/.ssh/config =====
 +<code>
 +Host test proverka
 +    HostName test.example.org
 +    User ninja
 +    IdentityFile ~/.ssh/id_ed25519
 +
 +Host *
 +    User charon
 +    # Keep-alive
 +    ServerAliveInterval 45
 +    ServerAliveCountMax 3
 +    UseRoaming no
 +    KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256
 +    # Ensure KnownHosts are unreadable if leaked - it is otherwise easier to know which hosts your keys have access to.
 +    HashKnownHosts yes
 +    # Host keys the client accepts - order here is honored by OpenSSH
 +    HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256
 +
 +    MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com
 +    Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
 </code> </code>
software/os/linux/shell/setup.1580478995.txt.gz · Востаннє змінено: 2020/01/31 15:56 повз charon