Linux - paulvi/notes GitHub Wiki
Instead of searching Internet, the best destination is actually Bitnami docs
https://docs.bitnami.com/virtual-machine/faq/configuration/configure-static-address/
[Match]
Name=INTERFACE-NAME
[Network]
Address=10.200.10.166/24
Gateway=10.200.10.254
DNS=10.200.10.1,10.200.10.2
https://www.debian.org/doc/manuals/debian-reference/index.en.html
Network config https://manjaro.site/how-to-configure-static-ip-address-on-debian-9-0/
on Debian 9 /etc/netwrok/interfaces
is actually reading /etc/netwrok/interfaces.d/setup file
#iface eth0 inet dhcp
iface eth0 inet static
address 10.200.10.166
netmask 255.255.255.0
gateway 10.200.10.254
dns-nameservers 10.200.10.1,10.200.10.2
Why enp0s3 and not eth0 https://askubuntu.com/questions/704035/no-eth0-listed-in-ifconfig-a-only-enp0s3-and-lo
ifconfig enp0s3 192.168.0.111 netmask 255.255.255.0
Renaming
- https://askubuntu.com/questions/704361/why-is-my-network-interface-named-enp0s25-instead-of-eth0
- https://askubuntu.com/questions/689501/how-to-rename-network-interface-in-15-10
list PCI devices
lspci
Alias
alias ll='ls -l'
Check Linux version (https://www.symantec.com/connect/articles/commands-check-linux-version-release-name-kernel-version)
cat /proc/version
List users:
cut -d: -f1 /etc/passwd
Add user:
useradd username
See logged-in users
w or who
check CPU
cat /proc/cpuinfo
check Memory
cat /proc/meminfo
watch -n 5 free -m
or
htop sudo apt-get install htop
check processes
top
great video https://channel9.msdn.com/Blogs/raw-tech/How-to-RDP-to-your-Linux-desktop-in-Azure
ssh into VM with Putty
sudo apt-get update
sudo apt-get install lxde\ubuntu-desktop\etc
sudo apt-get install xrdp
echo startlxde > ~/.xsession
sudo /etc/init.d/xrdp start
open port 3389 in Azure firewall
RDP to Ubuntu desktop :)
from http://askubuntu.com/questions/322122/switching-from-server-to-desktop (2G downloads)
sudo apt-get install ubuntu-desktop
Notes:
WiFi on Ubuntu bug: http://askubuntu.com/questions/470279/internet-slow-on-ubuntu-14-04
Check space
df command - Shows the amount of disk space used and available on Linux file systems. du command - Display the amount of disk space used by the specified files and for each subdirectory.
du -a <folder> | sort -n -r | head -n 10
df -h
fdisk -l
vgs
pvs
lvs
https://documentation.cpanel.net/display/CKB/How+to+Manage+your+Hard+Drive+Space
http://xmodulo.com/open-source-log-monitoring-tools-linux.html
