14 November 2019

How to install Adobe Reader using command line

First you need to open powershell as admin by pressing Windows+X and then A.

In the powershell prompt type following:

iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex

This will install chocolatey software management utility.

Open next powershell window using the same Windows+X, A shortcut and type:

cinst adobereader -y

This will install Adobe Reader to your system.

To list, what software has been installed using chocolatey, use this command:

clist -l

To get more information about chocolatey, go to web site https://chocolatey.org/

Choco

13 November 2019

How to resize partition from Windows command line

If you have already resized your disk in VM disk size, then you can do the remaining from command line. You can do it even remotely using psexec.exe (psexec diskpart \\yourservername)

You need to run diskpart.exe and give only 2 commands there:

sel vol c:
ext

After that you partition is resized. If you need to resize some other drive letter, then you must surf around and find the right volume using commands like list disk or list volume or list partition.

12 July 2019

How to change hostname in Ubuntu 18.04 LTS

If you have tried to change hostname in Ubuntu 18.04, then it probably will be lost after next reboot. So I digged for a almost full working day to sort it out and it turns out, you only need to change it in one file. No, it’s not dhclient.conf nor /hosts nor /etc/hostname, you don’t need to change them at all.

First you need to edit following user-data file, particularly the line which starts with hostname:

nano /var/lib/cloud/seed/nocloud-net/user-data

After that you need to commit those changes using those lines:

cloud-init clean
poweroff

Cloud-init command will clean the cloud configuration so on the next reboot the machine will get the info from the just modified user-data file.

Poweroff is needed for dhcp lease to be released, so at the next boot the machine will obtain a new lease using the new hostname. And when your DNS is integrated with DHCP, then also the correct A and PTR records will be placed in DNS server. Otherwise reboot can also be used.

17 April 2019

How to run Open Live Writer with blogspot.com with the help of Chocolatey

I havent written anything for a long time. One of the reasons was getting new computer without Live Writer on it. Okay, Live Writer is dead and now you will use Open Live Writer, but suddenly it stopped working with blogspot.com. I got instructions from this link https://www.sqlservercentral.com/blogs/how-to-get-open-live-writer-working-with-blogger

I will summarize it, because who knows how long the link is working and there is some typos also present:

Install Open Live Writer with my favourite software installer Chocolatey (see https://chocolatey.org/ for more information). After getting Chocolatey to work, open Administrative Command Prompt and run the following command:

cinst openlivewriter --version=0.5.1.2 -y

After running the command you will have the correct version, which works with blogspot.com

If you want to uninstall openlivewriter, then use this command:

cuninst openlivewriter -y

If you want to install Chocolatey with only one command line, use this command

powershell -ExecutionPolicy bypass "iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex"