tools and scripts for linux systems
ssh_port=1022
sudo sed -i 's/#Port 22/Port $ssh_port/' /etc/ssh/sshd_config
systemctl restart sshd
curl https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env" && \
echo -e "\n$(cargo --version).\n"
curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - && \
sudo apt-get install nodejs -y && \
echo -e "\nnodejs > $(node --version).\nnpm >>> v$(npm --version).\n"
Ubuntu
timedatectl set-timezone Europe/Moscow
apt -y install chrony
systemctl restart chrony && systemctl enable chrony
RHEL
timedatectl set-timezone Europe/Moscow
yum -y install chrony
systemctl restart chronyd && systemctl enable chronyd
echo "vm.swappiness=10" >> /etc/sysctl.conf
sysctl -p
sudo apt update
sudo apt install -y curl git build-essential jq lz4 unzip tar mc chrony htop ncdu nload screen
PASS=`openssl rand -base64 15`
sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
echo -e "$PASS\n$PASS" | passwd root
echo $PASS
make archive
tar cfvz example.tar.gz exampledir
download archive
port=22
srv_ip=111.111.111.111
sftp -P $port root@$srv_ip:/home/example.tar.gz /home
tar xvf example.tar.gz
http share folder
python3 -m http.server 8181
netstat -tulpn
-t - Show TCP ports.
-u - Show UDP ports.
-n - Show numerical addresses instead of resolving hosts.
-l - Show only listening ports.
-p - Show the PID and name of the listener’s process. This information is shown only if you run the command as root or sudo user.
wget -qO- bench.sh|bash
iotop
nload
sudo setenforce 0
sudo sed -i "s/SELINUX=enforcing/SELINUX=permissive/" /etc/selinux/config
echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf