Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Tuesday, August 4, 2015

apt FAQ

apt FAQ


Work in Progress...


Search for something apt can install
For example boost:
aptitude search libboost

Search, refresh search path
sudo aptitude update



Reference

Monday, August 3, 2015

Ubuntu Package Stuff

I may update this with more later

Search for a package:
http://packages.ubuntu.com/

See what packages are installed:
dpkg --get-selections
And grep to filter

Installing the JDK and maven on Ubuntu Server


This worked for me:

sudo apt-get install maven

sudo apt-get install openjdk-7-jdk


Or was it in the opposite order?


Reference:
http://askubuntu.com/questions/117189/apt-get-install-openjdk-7-jdk-doesnt-install-javac-why

Ubuntu on VirtualBox with Dual Network Interfaces

I needed to be able to reach the internet from a Ubuntu VM, and be able to get into it from my host machine, and I needed its IP address to be fixed.

I could not use the Bridged Adapter setting because the VM was going to be part of my work domain, and I found that if I shut it down for a while, or switched snapshots it would occasionally change its IP address.

A configuration that works for me is to make it have 2 adapters.

In VirtualBox Manager I went to:
File -> Preferences -> Network -> Host-only Networks
Verified there was an entry and set it up to have a DHCP server.

In my VM settings I set up so that network adapter 1 was host only, and 2 was NAT.

I then installed Ubuntu Server.

I told it to use the 2nd adapter for internet.

After it started I did:
vi /etc/network/interfaces
Which only showed:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth1
iface eth1 inet dhcp

So I tacked this onto the end of it:

auto eth0
iface eth0 inet dhcp

And then rebooted.

Now it can ping the host (Windows in my case), and the host can ping it, and I can ssh into it.

Updating Ubunu Server

Looks like these steps are good for updating a Ubuntu Server:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

And do a yes 'y' to everything.

They can be run multiple times to be sure.

Reference: http://askubuntu.com/questions/196768/how-to-install-updates-via-command-line