# Commandes

- `grep -n <text> <directory>`: search text in all file and display line  
- `netstat -ltup`: affiche les connections actives
- `nmap -sn 10.180.1.0/24` cherche les ip sur le reseau
- [![](https://wiki.ppsfleet.navy/uploads/images/gallery/2022-01/scaled-1680-/image-1641251899365.png)](https://wiki.ppsfleet.navy/uploads/images/gallery/2022-01/image-1641251899365.png)

```
nslookup bubble.home 10.10.10.8 # like dig
systemd-resolve --status # check current dns
```

### Process by network uses
```
nethogs
iftop
```

## wifi

`sudo iw wlp3s0f3u2u2 set power_save off`

`nmcli connection modify Clochette wifi.powersave disable`

https://www.linuxtricks.fr/wiki/networkmanager-se-connecter-en-wi-fi-en-cli-avec-nmcli

## sound

```
wpctl set-default 58
wpctl status
wpctl set-volume @DEFAULT_SINK@ .10- # decrease sound by 10%
```

## Systemd


```
# Automatic start-up of systemd user instances
loginctl enable-linger
```

## GPU

```
sudo envycontrol -s hybrid 
switcherooctl launch cmd
envycontrol -s integrated
```

## Debian

```
sudo apt install linux-headers-$(uname -r)
sudo apt install broadcom-sta-dkms
sudo dpkg-reconfigure broadcom-sta-dkms
```