Ubuntu updates via command line


sudo apt-get update        # Fetches the list of available updates
sudo apt-get upgrade       # Strictly upgrades the current packages
sudo apt-get dist-upgrade  # Installs updates (new ones)

Clean up the system from old packages:

sudo apt-get update && sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove

Check the Ubuntu version:

lsb_release -a

Force Apt-Get to IPv4 or IPv6 on Ubuntu or Debian

You can force IPv4 with:

apt-get -o Acquire::ForceIPv4=true update

or IPv6:

apt-get -o Acquire::ForceIPv6=true update

To make this persistent,check this post out:


XRDP – How to install XRDP on Ubuntu 16.04 – Easy Way

Check here:

XRDP – How to install XRDP on Ubuntu 16.04 – Easy Way

sudo apt-get install xrdp

sudo apt-get update

sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon

sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n mate-session \n' /etc/xrdp/startwm.sh

sudo ufw allow 3389/tcp

How to install Mono on Ubuntu

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list

sudo apt-get update

sudo apt-get install mono-runtime

How to install .Net Core on Ubuntu 16.04

Add the dotnet apt-get feed

In order to install .NET Core on Ubuntu, you need to first set up the apt-get feed that hosts the package you need.

sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
sudo apt-get update

Install .NET Core SDK

Before you start, please remove any previous versions of .NET Core from your system by using this script.

sudo apt-get install dotnet-dev-1.0.0-preview2-003121

Initialize some code

Let’s initialize a sample Hello World application!

mkdir hwapp
cd hwapp
dotnet new

Run the app

The first command will restore the packages specified in the project.json file, and the second command will run the actual sample:

dotnet restore
dotnet run

And you’re ready!

You now have .NET core running on your machine!

Source: .Net Core on Ubuntu