ubuntu linux¶
mount and umount a iso file¶
# create the directory where the iso file will be mounted
sudo mkdir /media/iso
# mount the file
sudo mount -o loop YOUR_FILE.ISO /media/iso
# umount the file
sudo umount /media/iso
replace servers on sources.list
¶
reference: http://askubuntu.com/a/20416
identify a new network card¶
in my case, an Realtek RTL8029AS from parallels desktop.
the drive was not listed. so, i need to check if the network card was found.
the nic was here, but no ip was set up. so, i removed the contents of 70-persistent-net.rules
file, and restarted the server.
fix setting locale failed
error¶
creating a swap file¶
# create a 4Gb swap file
sudo fallocate -l 4G /swapfile
# set permissions
sudo chmod 600 /swapfile
# format the file
sudo mkswap /swapfile
# enable swap on this file
sudo swapon /swapfile
# set some options on ubuntu, to better swap use
sudo sysctl vm.swappiness=10
sudo sysctl vm.vfs_cache_pressure=50
to made this changes permanent, add this to /etc/fstab
and add this to /etc/sysctl.conf
removing the canonical landscape service¶
sudo apt-get remove --purge landscape-client landscape-client-ui landscape-client-ui-install landscape-common
reference: How do I remove a computer from Landscape?
install vmware tools¶
redefining the apt-cacher's cache¶
# stop the service
sudo /etc/init.d/apt-cacher-ng stop
# move the old cache to a new place. This way, we can remove it
# in background (depending on the size, deletion may take a while)
sudo mv /var/cache/apt-cacher-ng /var/cache/apt-cacher-ng.old
sudo rm -rf /var/cache/apt-cacher-ng.old &
# create the new cache hierarchy, and set the correct owner
sudo mkdir -p /var/cache/apt-cacher-ng/{headers,import,packages,private,temp}
sudo chown -R apt-cacher-ng:apt-cacher-ng /var/cache/apt-cacher-ng
# start the service again
sudo /etc/init.d/apt-cacher-ng start