Terminal (sh)

The Basics

Many of these will require you prepend sudo before the command. This may be considered a questionable practice by those smarter than me.

Update Software

apt update
apt upgrade

Install Software

with notable examples

apt install [name]
apt install nodejs npm
apt install python3-pip

Control OS

sudo reboot now
sudo shutdown now

SSH Copy

Do this from local folder not connected to ssh

Copies local file to remote server

scp local-file.txt [email protected]:remote-file.txt

Copy a remote file to current local folder (dot at end is local folder)

scp [email protected]:remote-file.txt .

Download a file

Good for grabbing a script or other file from the internet.

curl -O file.txt

Connect to server

ssh user@ipaddress
exit

If you have issues with deprecated key algos

I forgot what scenario I needed this for.

ssh -oHostKeyAlgorithms=+ssh-rsa user@ipaddress

External IPV4 address

curl ifconfig.me
ffind /DATA/Media -type d -exec chmod 755 {} \;
find /DATA/Media -type f -exec chmod 644 {} \;
find /DATA/Media -type d -print0 | xargs -0 chmod 777
find /DATA/Media -type f -print0 | xargs -0 chmod 666

TODO

  • figure out how to do SSH keys

Last updated