Tagged: server

Changing Ubuntu Server Apt Source Repository


References

Abstract

Ubuntu Server, unlike the Ubuntu Desktop, has no GUI environment with fresh installation.

Backup

$ pwd
/etc/apt
$ ls -l
...
sources.list
...
$ sudo cp sources.list sources.list.bak
$ ls -l
...
source.list
source.list.bak
...
$ 

Check

Let’s take a look at the file.

$ pwd
/etc/apt
$ cat source.list
...
deb-src http://slower.ubuntu.com/ubuntu/ trusty multiverse
...
$

Update

Change all slower.ubuntu.com to faster.ubuntu.com.

$ pwd
/etc/apt
$ sudo vi source.list
$ cat source.list
...
deb-src http://faster.ubuntu.com/ubuntu/ trusty multiverse
...
$ 

Note

Those domain addresses used in above example aren’t real. In my case I changed kr.archive.ubuntu.com to ftp.daum.net.

Changing VirtualBox Ubuntu Server Console Resolution


Referred from here.

Edit /etc/default/grub so it looks like this.

$ cat /etc/default/grub
...
#GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX_DEFAULT="splash vga=792" # 1024x768@24bit
...

Update grub and reboot.

$ sudo update-grub
...
$ sudo reboot
$

Installing VirtualBox Guest Additions in Ubuntu Server


Insert the image by selecting the menu item of Devices / Insert Guest Additions CD Image... (Host+D).

Mount the inserted image.

$ sudo mount -t iso9660 -o ro /dev/cdrom /media/cdrom

Execute VBoxLinuxAdditions.run file.

$ cd /media/cdrom
$ ls -1F
...
VBoxLinuxAdditions.run
...
$ sudo ./VBoxLinuxAdditions.run
...
$

The script may complain about the absence of gcc and make. Install them and run the script again.

$ sudo apt-get -y install gcc make
...
$ sudo ./VBoxLinuxAdditions.sh
...
$

You can unmount the cdrom.

$ sudo umount /media/cdrom
$

You might want to reboot the guest.

$ sudo /sbin/shutdown -r now
$

One of benefits that guest additions offers is sharing folders between the host and the guest.

$ ls -l /media
drwxr-xr-x 2 root root    ____ MMM dd HH:mm cdrom/
drwxrwx--- 1 root vboxsf _____ MMM dd HH:mm sf_shared/
$

You can add yourself to vboxsf group and use them.

$ sudo adduser <yourself> vboxsf
...

You need to logout and login for making the change effects.

$ logout
$

Now you can read/(write) in the shared directory.

$ cd /media/sf_shared/
$ echo test > test.txt
$ cat test.txt
test
$