cat /proc/cpuinfo | grep Serial | cut -d' ' -f2
cat /proc/cpuinfo | grep 'Revision' | awk '{print $3}' | sed 's/^1000//'
ipv6.disable=1
to /boot/cmdline.txt
.
sudo reboot
CTRL-ALT-F2
sudo raspi-config
raspi-config
, press ESC key
([ -f /var/log/regen_ssh_keys.log ] && sudo rm /var/log/regen_ssh_keys.log || : ; ) &&
sudo rm /etc/ssh/ssh_host* &&
sudo ssh-keygen -A
([ -f /var/log/regen_ssh_keys.log ] && sudo rm /var/log/regen_ssh_keys.log || : ; ) &&
sudo rm /etc/ssh/ssh_host* &&
sudo ssh-keygen -A
~/.ssh/authorized_keys
[ -f ~/.ssh/authorized_keys ] && rm ~/.ssh/authorized_keys
~/.ssh/known_hosts
[ -f ~/.ssh/known_hosts ] && rm ~/.ssh/known_hosts
sudo su -c '(find /var/log -name "*.gz" -delete && for item in $(find /var/log/ -type f | grep -v git-daemon | grep -E -v '\.1$' ); do sudo cat /dev/null > $item; done && history -c )'
history -c
sudo poweroff
dd bs=4M if=/dev/sdd of=from-sd-card.img truncate --reference 2015-11-21-raspbian-jessie.img from-sd-card.img
sudo aptitude update
sudo aptitude -y safe-upgrade
sudo aptitude update &&
sudo aptitude -y safe-upgrade &&
sudo aptitude -y autoclean
sudo aptitude update &&
sudo aptitude -y safe-upgrade &&
sudo aptitude -y install ncurses-bin ncurses-dev &&
sudo aptitude -y install libncurses-dev libncurses5 &&
sudo aptitude -y install libtecla-dev libreadline-dev &&
sudo aptitude -y install htop &&
sudo aptitude -y install locate mlocate &&
sudo aptitude -y install tmux procserv &&
sudo aptitude -y install telnet &&
sudo aptitude -y install vim vim-fugitive &&
sudo aptitude -y install qgit python-git gitk git-all &&
sudo aptitude -y install ntpdate &&
sudo aptitude -y install re2c libpcre3-dev libpcre++-dev &&
sudo aptitude -y install wiringpi &&
sudo aptitude -y install picocom microcom &&
sudo aptitude -y install ca-certificates &&
sudo aptitude -y install python-setuptools ipython python-dev python-gpiozero &&
sudo aptitude -y install postgresql-all postgresql-autodoc postgresql-client postgresql-client-common postgresql-doc pgadmin3 pgadmin3-data phppgadmin &&
sudo aptitude -y install tightvncserver &&
sudo aptitude -y install i2c-tools &&
sudo aptitude -y install p7zip-full &&
sudo aptitude -y install avr-libc avrdude avrp binutils-avr gcc-avr gdb-avr simulavr avarice &&
sudo aptitude -y install munin-node lm-sensors munin-plugins-extra &&
sudo aptitude -y install ntp &&
sudo aptitude update &&
sudo aptitude -y safe-upgrade &&
sudo aptitude -y autoclean
([ -f /var/log/regen_ssh_keys.log ] && sudo rm /var/log/regen_ssh_keys.log || : ; ) &&
sudo rm /etc/ssh/ssh_host* &&
sudo ssh-keygen -A
~/.ssh/authorized_keys
[ -f ~/.ssh/authorized_keys ] && rm ~/.ssh/authorized_keys
~/.ssh/known_hosts
[ -f ~/.ssh/known_hosts ] && rm ~/.ssh/known_hosts
sudo su -c '(find /var/log -name "*.gz" -delete && for item in $(find /var/log/ -type f | grep -v git-daemon | grep -E -v '\.1$' ); do sudo cat /dev/null > $item; done && history -c )'
history -c
sudo poweroff
dd bs=4M if=/dev/sdd of=from-sd-card.img truncate --reference 2015-11-21-raspbian-jessie.img from-sd-card.img
printf 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", SYMLINK+="$env{ID_SERIAL}", GROUP="users", MODE="0666"\n
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ENV{ID_SERIAL}=="FTDI_FT232R_USB_UART_A100*", RUN+="/usr/bin/stty -F/dev/$kernel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke 115200 "\n
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ENV{ID_SERIAL}=="FTDI_FT232R_USB_UART_A801*", RUN+="/usr/bin/stty -F/dev/$kernel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke 115200 "\n' > /tmp/99-serial-permissions.rules &&
sudo chown root:root /tmp/99-serial-permissions.rules &&
sudo mv /tmp/99-serial-permissions.rules /etc/udev/rules.d/
dhclient
- dynamic hostname
Provided you have root privileges this can be achieved by creating a script file hostname
created in /etc/dhcp/dhclient-exit-hooks.d/
(on Debian), which is sourced by dhclient
after having updated/received its DHCP informations.
#!/bin/sh # Filename: /etc/dhcp/dhclient-exit-hooks.d/hostname # Purpose: Used by dhclient-script to set the hostname of the system # to match the DNS information for the host as provided by # DHCP. # # Do not update hostname for virtual machine IP assignments if [ "$interface" != "eth0" ] && [ "$interface" != "eth1" ] && [ "$interface" != "wlan0" ] then return fi if [ "$reason" != BOUND ] && [ "$reason" != RENEW ] && [ "$reason" != REBIND ] && [ "$reason" != REBOOT ] then return fi echo dhclient-exit-hooks.d/hostname: Dynamic IP address = $new_ip_address hostname=$(a=$(host $new_ip_address) || { false; } && { echo -n $a | cut -d ' ' -f 5 | cut -d "." -f 1; true; }) || unset hostname && echo ${hostname?} > /etc/hostname && hostname $hostname && export HOSTNAME=$hostname && echo dhclient-exit-hooks.d/hostname: Dynamic Hostname = $hostname
sudo curl -s https://wiki.gsi.de/pub/Epics/TipsLinuxDhclientDynamicHostname/_etc_dhcp_dhclient-exit-hooks.d_hostname -o $file && sudo dos2unix $file && sudo chmod a+r $file
ntp
or systemd-timesyncd
, deactivate the other and /etc/ntp.conf
to German de.pool.ntp.org
/etc/ntp.conf
, e.g. server 192.168.100.50 iburst
server timeserver1.gsi.de iburst
server ptbtime1.ptb.de iburst
sudo apt-get purge ntp
systemctl restart systemd-timesyncd.service
sudo timedatectl set-ntp true
/etc/systemd/timesyncd.conf
timeserver 192.168.100.50 timeserver1.gsi.de de.pool.ntp.org ptbtime1.ptb.de
sudo nano /etc/systemd/timesyncd.conf
sudo systemctl restart systemd-timesyncd.service
sudo timedatectl set-ntp true
sudo systemctl stop systemd-timesyncd
sudo systemctl disable systemd-timesyncd
/etc/ntp.conf
to German de.pool.ntp.org
sudo perl -pi.bak -e 's/^(server [0123])\..*?\.pool\.ntp\.org/\1.de.pool.ntp.org/g' /etc/ntp.conf
/etc/ntp.conf
server 192.168.100.50 iburst
server timeserver1.gsi.de iburst
server ptbtime1.ptb.de iburst
dhclient
- forced time update
Provided you have root privileges this can be achieved by creating a script file ntp_force_update
created in /etc/dhcp/dhclient-exit-hooks.d/
(on Debian), which is sourced by dhclient
after having updated/received its DHCP informations.
#!/bin/sh # Filename: /etc/dhcp/dhclient-exit-hooks.d/ntp_force_update # Purpose: Used by dhclient-script to set the time of the system # # Do not update hostname for virtual machine IP assignments if [ "$interface" != "eth0" ] && [ "$interface" != "eth1" ] && [ "$interface" != "wlan0" ] then return fi if [ "$reason" != BOUND ] && [ "$reason" != RENEW ] && [ "$reason" != REBIND ] && [ "$reason" != REBOOT ] then return fi service ntp status >/dev/null 2>&1 && ( sleep 5 && service ntp stop && ntpd -qg ; service ntp start; touch /tmp/force_update ) & systemctl status systemd-timesyncd.service >/dev/null 2>&1 && ( sleep 5 && systemctl status systemd-timesyncd.service stop && timedatectl ; systemctl status systemd-timesyncd.service start; touch /tmp/force_update ) &
sudo curl -s https://wiki.gsi.de/pub/Epics/TipsLinuxDhclientForceTimeUpdate/_etc_dhcp_dhclient-exit-hooks.d_ntp_force_update -o $file && sudo dos2unix $file && sudo chmod a+r $file
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
sudo usermod -aG docker your-user
Remember that you will have to log out and back in for this to take effect!
WARNING: Adding a user to the "docker" group will grant the ability to run
containers which can be used to obtain root privileges on the
docker host.
Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
for more information.
/etc/bash.bashrc
and uncomment bash_completion section sudo vi /etc/bash.bashrc
([ -f /var/log/regen_ssh_keys.log ] && sudo rm /var/log/regen_ssh_keys.log || : ; ) &&
sudo rm /etc/ssh/ssh_host* &&
sudo ssh-keygen -A
([ -f /var/log/regen_ssh_keys.log ] && sudo rm /var/log/regen_ssh_keys.log || : ; ) &&
sudo rm /etc/ssh/ssh_host* &&
sudo ssh-keygen -A
~/.ssh/authorized_keys
[ -f ~/.ssh/authorized_keys ] && rm ~/.ssh/authorized_keys
~/.ssh/known_hosts
[ -f ~/.ssh/known_hosts ] && rm ~/.ssh/known_hosts
sudo su -c '(find /var/log -name "*.gz" -delete && for item in $(find /var/log/ -type f | grep -v git-daemon | grep -E -v '\.1$' ); do sudo cat /dev/null > $item; done && history -c )'
history -c
sudo poweroff
dd bs=4M if=/dev/sdd of=from-sd-card.img truncate --reference 2015-11-21-raspbian-jessie.img from-sd-card.img
epics
: sudo adduser epics
epics/r p i - c t r l
epics
, add to groups, amongst other, become "sudoer" (
myGROUPS="adm dialout cdrom sudo audio video plugdev games users input netdev spi";
for group in $myGROUPS;
do
sudo adduser epics $group;
done;
unset myGROUPS;
)
visudo
to change sudoer settings: visudo
epics ALL=(ALL) NOPASSWD: ALL
mkdir -p ~epics/EPICS/{EPICS-3.15.3,bin,programs}
sudo ln -s ~/EPICS/bin/epics /usr/local/bin/epics