Are you interested in bypassing the complexities of Network Address Translation (NAT) and deploying containers without the need for IP address translation? The solution lies in acquiring ample public IP addresses, although the high cost of each IPv4 address makes it impractical to assign one to every container. Conversely, IPv6 offers an abundance of addresses,… Continue reading AWS and IPv6 only solution
Category: Linux
EC2 Mac
# # On your laptop, connect to the Mac instance with SSH (similar to Linux instances) # ssh -i ec2-user@ # # On the Mac # # Set a password for ec2-user sudo passwd ec2-user # Enable VNC Server (thanks [email protected] for the feedback and tests) sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \ -activate -configure -access -on \ -configure… Continue reading EC2 Mac
Linux check occupied space in folder
hidden files sudo du -sch /home/ec2-user/.[!.]* |sort -h all files except hidden sudo du -sch /home/ec2-user/* |sort -h
Linux startup script
Create script in /etc/init.d sudo nano /etc/init.d/NameOfYourScript The following is an example based on starting up the no-ip service [/usr/local/bin/noip], but change the name of the script and the command to start and stop it and it would work for any command. #! /bin/sh # /etc/init.d/noip### BEGIN INIT INFO # Provides: noip # Required-Start: $remote_fs… Continue reading Linux startup script
XFCE4 Vnc Linux
#!/bin/sh unset SESSION_MANAGER unset DBUS_SESSION_BUS_ADDRESS startxfce4 &
Resize EBS volume without rebooting in AWS
This article guide you to resize the EBS volume without rebooting 1. Modify volume in AWS EC2 UI After login to AWS console, navigate to EC2 -> Elastic Block Store -> Volumes. Click on the volume that you wist to resize, then select Actions -> Modify Volume. It will open a popup. i) Enter the… Continue reading Resize EBS volume without rebooting in AWS
Python Daemon
There can only be one daemon process running: that is managed by the PID lock file, like most other Linux daemons. To stop it, do kill `cat /var/run/eg_daemon.pid` To see if it is running: ps -elf | grep `cat /var/run/eg_daemon.pid` Using the pidfile submodule, the PID file is managed automatically. When the daemon is stopped,… Continue reading Python Daemon
Linux, Debian remove / stop service
To stop a service sudo service servicename stop To disable service autostart sudo update-rc.d servicename disable
Raspberry turn off usb ports
download this https://github.com/codazoda/hub-ctrl.c You can control the power on a port using the following command. (I installed it in user bin directory) sudo $HOME/bin/hub-ctrl -h 1 -P 2 -p 1 That says to control hub 3 (-h 3) port 1 (-P 1) and to turn the power off (-p 0). You can also use ”-p… Continue reading Raspberry turn off usb ports
Raspberry: upload Arduino sketch from CLI
install these packages sudo apt-get install arduino-core arduino-mk Then add yourself to the dialout group to allow you to upload code to the Arduino board sudo usermod -a -G dialout pi (Change pi to be your username if different) Create Makefile ARDUINO_DIR = /usr/share/arduino BOARD_TAG = uno ARDUINO_PORT = /dev/ttyACM* ARDUINO_LIBS = include /usr/share/arduino/Arduino.mk to… Continue reading Raspberry: upload Arduino sketch from CLI