16-03-2021

This commit is contained in:
2021-03-16 06:57:22 +01:00
parent fb07a20b0c
commit e02b036875
27 changed files with 1860 additions and 128 deletions

View File

@@ -18,6 +18,13 @@ network={
}
```
```bash
# Recharger les nouvelles configurations
$ wpa_cli -i wlan0 reconfigure
```
#### Encoder le mot de passe:
```bash
@@ -49,7 +56,7 @@ source-directory /etc/network/interfaces.d
#### Adresses IP:
```bash
$ ip -4 addr | grep global
$ ip -4 addr | grep inet
inet 192.168.1.254/24 brd 192.168.1.255 scope global eth0
inet 192.168.1.21/24 brd 192.168.1.255 scope global wlan0
```
@@ -82,6 +89,38 @@ $ ls /sys/class/net
eth0 lo wlan0
```
```bash
$ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether dc:a6:32:55:56:e0 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Boucle locale)
RX packets 375 bytes 32464 (31.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 375 bytes 32464 (31.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.2.251 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::e55e:a7fc:915f:fb98 prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:55:56:e1 txqueuelen 1000 (Ethernet)
RX packets 91361 bytes 29942853 (28.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 22382 bytes 3480690 (3.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```
#### Mettre en IP fixe:
```bash
@@ -90,16 +129,51 @@ $ sudo nano /etc/dhcpcd.conf
# à rajouter à la fin du fichier:
interface eth0
static ip_address=192.168.1.254/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8
static ip_address=192.168.2.252/24
static routers=192.168.2.1
static domain_name_servers=8.8.8.8 8.8.4.4
interface wlan0
static ip_address=192.168.1.253/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8
static ip_address=192.168.2.251/24
static routers=192.168.2.1
static domain_name_servers=8.8.8.8 8.8.4.4
```
#### Modifier le hostname:
```bash
$ sudo raspbi-config
# 1 System Options puis S4 Hostname
```
```bash
$ sudo nano /etc/hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 raspberrypi4
```
puis
```bash
$ sudo nano /etc/hostname
raspberrypi4
```
#### Redémarrer le service réseau:
```bash
$ service networking restart
```
#### VNC:
*VNC Server (Pi):*
@@ -115,7 +189,7 @@ Menu → Options:
- Utilisateur standart: Mot de passe
*VNC Viewer (Mac):*