A few pointers:
- don’t start Virtualbox up via the GUI
- e.g. putting it into standby will confuse Vagrant
- also there’s no root password set
Just do a vagrant up
and a vagrant ssh
.
A few pointers:
Just do a vagrant up
and a vagrant ssh
.
Unbelievable.
Ubuntu 16.04 LTS could not connect to my Wifi network on either of 2 separate Dell laptops (the newer laptops have terrible keyboard layouts by the way. The one I’m using has shoe-horned a number pad to the right of the main keyboard. So there are 2 enter buttons. The Enter button on the right of the normal keyboard is tiny! There are also 2 sets of mouse buttons – one for the IBM style middle of the keyboard nipple and one for the trackpad. Crazy frankenstein monster.)
My Mac was fine connecting to the network.
Another wasted evening weekend due to Linux’s crappy Wifi networking.
ifconfig
does not show gateway info.
Instead you need to do:
ip route | grep default
Here’s an example of the sort of advice people are getting to try and fix it:
1 2 3 4 5 6 7 8 9 10 |
Please do: Code: sudo apt-get purge bcmwl-kernel-source Wifi should work again. Then: Code: echo "options rt2800pci nohwcrypt=y" | sudo tee /etc/modprobe.d/rt2800pci.conf sudo modprobe -rfv rt2800pci sudo modprobe -v rt2800pci Set your network manager settings to match the screenshots and the disconnects should stop and probably have a faster connection. |
What a shit-show!
Dell’s advice?
Use nm-tool
– a tool now deprecated and no longer supplied with Ubuntu.
These:
nmcli c
(more on this later)
lshw -c network
are the replacements.
Also useful:
iwconfig
is awesome. E.g.
nmcli device wifi list
will show you the Bars, Signal strength and Security.
And put an asterisk next to the connection you’re connected to.
nmcli networking connectivity
is not much use. It shows: full
even if you can’t connect to the internet.
nmcli monitor
shows connection progress.
However it reports connected
even if you can’t connect to the internet.
https://askubuntu.com/a/768310
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
┌────────────────────────────────────────────────────────────┤ Configuring Secure Boot ├────────────────────────────────────────────────────────────┐ │ │ │ Your system has UEFI Secure Boot enabled. │ │ │ │ UEFI Secure Boot is not compatible with the use of third-party drivers. │ │ │ │ The system will assist you in toggling UEFI Secure Boot. To ensure that this change is being made by you as an authorized user, and not by an │ │ attacker, you must choose a password now and then use the same password after reboot to confirm the change. │ │ │ │ If you choose to proceed but do not confirm the password upon reboot, Ubuntu will still be able to boot on your system but the Secure Boot state │ │ will not be changed. │ │ │ │ If Secure Boot remains enabled on your system, your system may still boot but any hardware that requires third-party drivers to work correctly │ │ may not be usable. │ │ |
e.g.
Setting up virtualbox (5.1.38-dfsg-0ubuntu1.16.04.2) …
vboxweb.service is a disabled or a static unit, not starting it.
Job for virtualbox.service failed because the control process exited with error code. See “systemctl status virtualbox.service” and “journalctl -xe” for details.
invoke-rc.d: initscript virtualbox, action “restart” failed.
● virtualbox.service – LSB: VirtualBox Linux kernel module
Loaded: loaded (/etc/init.d/virtualbox; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-01-29 15:51:32 GMT; 2ms ago
Docs: man:systemd-sysv-generator(8)
Process: 10816 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/FAILURE)
Jan 29 15:51:32 w-dell systemd[1]: Starting LSB: VirtualBox Linux kernel module…
Jan 29 15:51:32 w-dell virtualbox[10816]: * Loading VirtualBox kernel modules…
Jan 29 15:51:32 w-dell virtualbox[10816]: * modprobe vboxdrv failed. Please use ‘dmesg’ to find out why
Jan 29 15:51:32 w-dell virtualbox[10816]: …fail!
Jan 29 15:51:32 w-dell systemd[1]: virtualbox.service: Control process exited, code=exited status=1
Jan 29 15:51:32 w-dell systemd[1]: Failed to start LSB: VirtualBox Linux kernel module.
Jan 29 15:51:32 w-dell systemd[1]: virtualbox.service: Unit entered failed state.
Jan 29 15:51:32 w-dell systemd[1]: virtualbox.service: Failed with result ‘exit-code’.
Setting up virtualbox-qt (5.1.38-dfsg-0ubuntu1.16.04.2) …
Processing triggers for libc-bin (2.23-0ubuntu10) …
Processing triggers for shim-signed (1.33.1~16.04.3+15+1533136590.3beb971-0ubuntu1) …
Processing triggers for systemd (229-4ubuntu21.15) …
Processing triggers for ureadahead (0.100.0-19) …
W: Operation was interrupted before it could finish
The touchpad can be automatically set up via Settings > Touchpad > Natural Scrolling.
However, plugging in a USB mouse is more difficult.
Enable system-wide inverse/reverse/natural scrolling on Ubuntu
In case it disappears:
1 |
xinput list |
Take that number you got (just the number after “id=”) and replace “{device id}” with that number in the following command:
1 |
xinput list-props {device id} | grep "Scrolling Distance" |
In my case:
1 |
xinput list-props 6 | grep "Scrolling Distance" |
This will output something like below, remember that “Scrolling Distance” is case-sensitive. If nothing is outputted, you’ve chosen a wrong device id, go back to step 1 and choose another one:
1 |
Evdev Scrolling Distance (270): 1, 1, 1 |
So 270 is your property number, 1, 1, 1 is your scrolling distance, remember this to use later.
It is case sensitive unless you use -i in the grep command. Write down the numbers you find in the output from that command (in my case it was the number 1, shown three times and separated by commas). You will use the negative values of the numbers you get in your output. Also, make sure to write down the property number (it will be in parentheses in the output; in my case, it was (270) in Ubuntu and (273) in Fedora).
Note: If you get no output containing the property “Scrolling Distance” this method will not work for you and you will need to stop here and skip to an alternate way.
1 |
sudo touch /usr/share/X11/<span class="skimlinks-unlinked">xorg.conf.d/20-natural-scrolling.conf</span> |
1 |
sudo nano /usr/share/X11/<span class="skimlinks-unlinked">xorg.conf.d/20-natural-scrolling.conf</span> |
In the file you have opened in your preferred text editor, paste the following (but be sure to change the numbers to the same comma-separated numbers you got from step 3; in my case, the number was 1 so in order to make the scroll inverse, I will change 1 to -1):
1 2 3 4 5 6 7 8 |
Section "InputClass" Identifier "Natural Scrolling" MatchIsPointer "on" MatchDevicePath "/dev/input/event*" Option "VertScrollDelta" "-1" Option "HorizScrollDelta" "-1" Option "DialDelta" "-1" EndSection |
Save the file (Ctrl+O) and exit (Ctrl+X) the text editor. No need for a reboot. Just issue the following command (substituting the property number and the negatives of the numbers you got in the third step, and the device id you got from the second step):
1 |
xinput set-prop {device id} {property number} -1 -1 -1 |
In my case:
1 |
xinput set-prop 6 270 -1 -1 -1 |
Let’s say you want to find out the version of some software. It’s a fucking mess. The options tend to be:
<software name> -v
<software name> --version
<software name> -V
<software name> version
<software name> -version
Unfortunately they all vary. E.g.
Python understands --version
and -V
.
Whereas Ansible only takes --version
.
ssh only understands -V
whereas PHP understands -v
and --version
.
Finally, Java stands by itself with the odd -version
.
And I still haven’t figured out how you get ls
to tell you its version on the Mac: https://unix.stackexchange.com/questions/415415/option-to-output-version
Here’s what uses what:
-v
--version
-V
version
-version
Interpolations can contain conditionals. E.g.
1 2 3 |
<span class="n">resource</span> <span class="s2">"aws_instance"</span> <span class="s2">"web"</span> <span class="p">{</span> <span class="n">subnet</span> <span class="o">=</span> <span class="s2">"${var.env == "</span><span class="n">production</span><span class="s2">" ? var.prod_subnet : var.dev_subnet}"</span> <span class="p">}</span> |
using ternary operation:
1 2 |
CONDITION ? TRUEVAL : FALSEVAL |
i.e. if var.env == "production"
then subnet = var.prod_subnet
else subnet = var.dev_subnet
https://www.terraform.io/docs/configuration/interpolation.html#conditionals
Our monthly AWS bill is millions of dollars per year. So, we’re always trying to reduce costs.
Here are a few tips – some of these are Kubernetes but mainly AWS:
Cost Optimization is also one of the five pillars of the Well-Architected Framework from AWS: https://aws.amazon.com/architecture/well-architected/
i.e. https://d1.awsstatic.com/whitepapers/architecture/AWS-Cost-Optimization-Pillar.pdf
Billing Dashboard AWS: https://console.aws.amazon.com/billing/home
Business Intelligence software: