Table des matières

Yunohost

  • [Démarrer les services] service nginx start
  • [Status des services] nginx -t
  • [Listes les sources] ls /etc/apt/sources.list.d

Auto start program and switch tty

* File /usb/bin/boot_prompt.sh
#!/usr/bin/env bash
#LANG=C
#LANGUAGE=C
#LC_ALL=C
chvt 5
htop > /dev/tty5 2>&1
exit 0

* File /lib/systemd/system/getty@
ExecStart=-/sbin/getty/ --noclear -a root %I $TERM

Linux/Debian

=== Autologin in TTY4 and auto switch in rc.local or .bashrc * chvt 4 * APPNAME > /dev/tty4 2>&1 === Copy folder to another * cp -R source destination/ === Search pattern in file

  • grep -rnw '/path/to/somewhere/' -e 'pattern'

=== Remove full folder

  • rm -rf foldername

=== Rename user on Debian

  The straight out way of doing this is:
  Create a new temp account with sudo rights:
  • sudo adduser temp
  • sudo adduser temp sudo
  Log out from your current account and back in with the temp account.
  Rename your username and directory:
  • sudo usermod -l new-username -m -d /home/new-username old-username
  Rename your username default's group:
  • sudo groupmod -n new-username old-username
  Log out from temp account and log back into your account with new-username.
  Remove temp account:
  • sudo userdel -r temp

Otherwise, you just (1) create a new user and (2) rsync the old user home folder to the new and then (3) chown it.

== Upload from command line to pastebin-like

Searx

Raspberry Pi

To configure the raspiaudio device (Audio 5W*2+Mic) on Raspbian or whatever * sudo wget -O - script.raspiaudio.com | bash

Driver for 3.5“ LCD Screen * https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)