Loads of solutions exist, but for changing the system default, alias is not the way to go.
$ update-alternatives --list python update-alternatives: error: no alternatives for python
| {"lastUpload":"2020-10-26T04:49:44.781Z","extensionVersion":"v3.4.3"} |
List available python options
ls -larth `which python`*
lrwxrwxrwx 1 root root 10 Mar 23 2016 /usr/bin/python3m -> python3.5m
lrwxrwxrwx 1 root root 9 Mar 23 2016 /usr/bin/python3 -> python3.5
lrwxrwxrwx 1 root root 9 Nov 24 2017 /usr/bin/python2 -> python2.7
lrwxrwxrwx 1 root root 9 Nov 24 2017 /usr/bin/python -> python2.7
-rwxr-xr-x 2 root root 4.3M Nov 28 2017 /usr/bin/python3.5m
-rwxr-xr-x 2 root root 4.3M Nov 28 2017 /usr/bin/python3.5
| sudo apt-get update | |
| sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev -y | |
| wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz | |
| tar xf Python-3.6.0.tar.xz | |
| cd Python-3.6.0 | |
| ./configure | |
| make | |
| sudo make altinstall | |
| echo "Do you wish to delete the source code and uninstall all previously installed packages? {Y/N} (Case sensitive!)" |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| # config to don't allow the browser to render the page inside an frame or iframe | |
| # and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking | |
| # if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri | |
| # https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options | |
| add_header X-Frame-Options SAMEORIGIN; | |
| # when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header, | |
| # to disable content-type sniffing on some browsers. | |
| # https://www.owasp.org/index.php/List_of_useful_HTTP_headers | |
| # currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx |
| # ~/.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 not running interactively, don't do anything | |
| [ -z "$PS1" ] && return | |
| # don't put duplicate lines in the history. See bash(1) for more options | |
| # ... or force ignoredups and ignorespace | |
| HISTCONTROL=ignoredups:ignorespace |
| #!/bin/bash | |
| set -e | |
| ## Check for versions compiled with ARM at http://nodejs.org/dist/ | |
| ## Inspired by http://oskarhane.com/raspberry-pi-install-node-js-and-npm/ | |
| ## Fill in the Node Version here: | |
| ########################################################################## | |
| NODE_VERSION="v12.16.1" | |
| ########################################################################## |
| ## Place this file in "/etc/sysctl.d/network-tuning.conf" and | |
| ## run "sysctl -p" to have the kernel pick the new settings up | |
| # Avoid a smurf attack | |
| net.ipv4.icmp_echo_ignore_broadcasts = 1 | |
| # Turn on protection for bad icmp error messages | |
| net.ipv4.icmp_ignore_bogus_error_responses = 1 | |
| # Turn on syncookies for SYN flood attack protection |
| #!/bin/bash | |
| #pass the input url file | |
| #urls must be in new lines | |
| File=$1 | |
| while read url; do | |
| status=$(curl -sI $url | head -1 | awk '{print $2}') | |
| redirect=`curl -sI $url | grep "Location\|location" | awk '{print $2}'` | |
| echo $url $status $redirect >>url_out.txt | |
| done <$File |