Tuesday, February 11, 2014

Ubuntu, Remove crap

$ sudo apt-get purge libreoffice-*
$ sudo apt-get purge firefox*
$ sudo apt-get purge thunderbird*






List all installed packages (pipe to grep to search for a specific pattern):
$ dpkg --get-selections | grep <pattern>

remove all libreoffice packages:

$ sudo apt-get purge libreoffice-*

remove orphaned packages, i.e. installed packages that used to be installed as an dependency, but aren't any longer. Use this after removing a package which had installed dependencies you're no longer interested in:
$ sudo apt-get autoremove

see what packages are available to install matching a  pattern
$ apt-cache search <pattern>

To see all the files installed by a package like python-kivy-examples:
$ dpkg-query -L  <package name>

Change Ubuntu Devicename (Hostname)

Change the “device name” in the details window of System settings

$ sudo sed -i 's/present-host-name/new-host-name/' /etc/hosts
$ sudo sed -i 's/present-host-name/new-host-name/' /etc/hostname
$ reboot

Hmmm. attempt on the 2nd sed command failed and the /etc/hostname file was already correct. Perhaps it was changed automatically in response to the first sed.

You can check your present-host-name by
$ cat /etc/hostname
or
$ hostname


Thursday, August 15, 2013

Linux & Windows partition changes, boot fun

To remove GRUB from the MBR on primary disk in the laptop that hold Windows 7:

  • boot with recovery DVD
  • get to a command window
  • issue commands to re-write the MBR

To write GRUB to the external HD containing Linux Mint:
  • Boot Machine off Mint Live DVD (can't use virtual box for this)
  • Launch GPARTED to determine disk and partition holding Mint
  • Open terminal window
  • sudo mount   /dev/sdb1   /mnt
  • sudo grub-install /dev/sdb  --root-directory=/mnt
grub probe does report some errors but installation of grub works.


to refresh the grub menu on the external drive (if it needs updating...):
  • sudo update-grub

to add an entry for linux into the Windows boot menu (otherwise one needs to get the boot list (f12 at startup)):


Tuesday, August 6, 2013

Powershell (Windows... ugg)

Powershell ISE

Powershell 2.0 was loaded on my Win7 SP1 machine so...

Windows Management Framework 3.0 (includes PS 3.0)
http://www.microsoft.com/en-us/download/details.aspx?id=34595



How to determine what version of PowerShell is installed:
PS C:\> $psversiontable

To Update help in PS, start an elevated PS session (not the ISE!) and enter:

PS> Update-Help