« Ubuntu arm 20.04 » : différence entre les versions

De Banane Atomic
Aller à la navigationAller à la recherche
Ligne 58 : Ligne 58 :
* [https://github.com/zsh-users/zsh-syntax-highlighting zsh-syntax-highlighting]: syntax highlighting
* [https://github.com/zsh-users/zsh-syntax-highlighting zsh-syntax-highlighting]: syntax highlighting
* [https://github.com/Powerlevel9k/powerlevel9k zsh-theme-powerlevel9k]: theme (deprecated)
* [https://github.com/Powerlevel9k/powerlevel9k zsh-theme-powerlevel9k]: theme (deprecated)
= [https://netplan.io/ netplan] =
<filebox fn='/etc/netplan/01-netcfg.yaml'>
network:
    version: 2
    renderer: NetworkManager
    ethernets:
        eth0:
            addresses: [192.168.0.x/24]
            gateway4: 192.168.0.y
            nameservers:
                addresses: [192.168.0.x, 192.168.0.y]
</filebox>
{{info | Renderers: {{boxx|NetworkManager}} {{boxx|networkd}}}}
<kode lang='bash'>
# tester la syntaxe (possibilité de revert)
sudo netplan try
sudo netplan generate
sudo netplan apply
# --debug if you run into some issues
# créé le fichier /run/systemd/network/10-netplan-eth0.network
# vérifier la configuration en cour
netplan ip leases [interface]
</kode>


= [[ufw|UFW configuration]] =
= [[ufw|UFW configuration]] =

Version du 8 août 2023 à 22:07

Links

Useful commande lignes

Bash.svg
# updates
adg  # sudo apt update && sudo apt upgrade
sudo snap refresh

sudo reboot
sudo poweroff

APT (Advanced Package Tool)

zsh - oh my zsh

Bash.svg
# install zsh
apt install zsh zsh-syntax-highlighting
# zsh install zsh-common

# install oh-my-zsh and set zsh as default shell for the current user
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
~/.zshrc
plugins=(
    alias-finder
    colored-man-pages
    common-aliases
    copybuffer
    debian
    extract
    fd
    git
    ripgrep
    sudo
    systemd
    wd)

# don't store in history commands prefixed with a space (test with: history | tail)
setopt HIST_IGNORE_SPACE

# add hostname to PROMPT only for ssh connection
if [[ -n $SSH_CONNECTION ]]; then
    PROMPT="%m ${PROMPT}"
fi

# must be loaded last
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

netplan

/etc/netplan/01-netcfg.yaml
network:
    version: 2
    renderer: NetworkManager
    ethernets:
        eth0:
            addresses: [192.168.0.x/24]
            gateway4: 192.168.0.y
            nameservers:
                addresses: [192.168.0.x, 192.168.0.y]
Renderers: NetworkManager networkd
Bash.svg
# tester la syntaxe (possibilité de revert)
sudo netplan try

sudo netplan generate
sudo netplan apply
# --debug if you run into some issues
# créé le fichier /run/systemd/network/10-netplan-eth0.network

# vérifier la configuration en cour
netplan ip leases [interface]

UFW configuration

Bash.svg
sudo ufw allow OpenSSH       # port 22
sudo ufw allow 'Nginx Full'  # port 80 443
sudo ufw allow DNS           # port 53 (dnsmasq)

PHP 8+

Bash.svg
sudo add-apt-repository ppa:ondrej/php

sudo add-apt-repository ppa:ondrej/nginx-mainline  # new features, updates, bugfixes
sudo add-apt-repository ppa:ondrej/nginx           # no new features, major bugfixes only, annual release
sudo add-apt-repository ppa:ondrej/apache2