Ubuntu Linux Guide

Ubuntu Linux help provides detailed instructions to help troubleshoot ubuntu linux software and hardware problems.

Networking. Ubuntu 12.04 LTS.

Of course Ubuntu offers standard networking utilities, such as a network manager application to view data transfer rates, connectivity and the number of connected users. Because Ubuntu is so lightweight it requires very few system resources to serve webpages and handle ftp uploads and downloads. 

The Ubuntu Linux operating system is extremely capable of becoming the perfect server. Apache2 is the web server application most popular among Ubuntu users who would like to serve web pages, and access files via webdav and ftp. 

 

Connect to wireless networks using terminal

If for some reason you choose not to use Ubuntu's Network Manager it is still possible to connect to wireless networks withouth this using Terminal, a command line interface. 


First we will want to open Terminal and lookup all available wireless networks:

 

iwlist wlan0 s


Note: The s is for Scan, wlan0 is for the wireless card. Also you will need sudo to execute this option.

If you do not know the name of your wireless devices use the following command, which will show you your wired/wireless devices and their names. They might be something like wlan0, wlan1, eth1, eth2:

 

iwconfig

After the lookup connect to it. Assuming it does not have a password do:

 

iwconfig wlan0 essid NAME_OF_ACCESS_POINT

For example:

 

iwconfig wlan0 essid CYREX


After that just be sure to use dhclient. That should have you connected to the CYREX router and have it search for an available IP address.

If the network is secured and requires a password enter:

 

iwconfig wlan0 essid CYREX key PASSWORD

That should connect to it using the PASSWORD you gave there.


Just to make sure do a iwconfig after all that. It should show your device connected and the IP assigned to you. After that, optionally, do a dhclient to make sure you grab the auto IP from the router.


If you get an Interface doesn't support scanning message then try the following 2 options:

 

1.  Test if your interface is UP: sudo ifconfig wlan0 up 

2.  Try adding sudo when doing the scan: iwlist wlan0 s

Best way to Cache apt downloads on LAN

01/29/2013

I did some research into a bunch of solutions and some Ubuntu developers came up with a proxy configuration (based on Squid) for 10.04 and later. It's called squid-deb-proxy. It only requires a machine to act as the server. Large organizations usually run their own full mirrors but for most people the on demand mirroring is enough.


Why squid-deb-proxy?
  • No editing of files on the client side.
  • Use zeroconf so that clients were "zero config"
  • Use an existing, solid proxy solution instead of writing a new tool.
  • Easy to set up for a typical Linux administrator.
Server Config

On the machine you want to act as a server install the tool with:

 

sudo apt-get install squid-deb-proxy avahi-utils

Now start the service bits:

 
sudo start squid-deb-proxy

And the avahi bits (You don't need this if you're on 12.04):

 
sudo start squid-deb-proxy-avahi

This will install the proxy server (which listens to port 8000 by default) and the avahi tools needed for the server to advertise itself on your network via zeroconf.


Client Config

On each of the computers that you want to use the cache (the clients, and the server itself so it can use the cache too), you need to install the client side tool that let's apt look for the server automatically, have them click here:

 
sudo apt-get install squid-deb-proxy-client
Optional: For maximum efficiency you should set one machine to automatically download updates, so that when your other machines need it it's already in the cache. You can do this by going to System->Administration->Update Manager, then click on the "Settings..." button, in the Update tab set it to automatically download all the updates.
Caching 3rd Party Sources

By default the cache is set up to only cache official Ubuntu repositories. To add more you need to add them to the list of sources at /etc/squid-deb-proxy/mirror-dstdomain.acl. This is where you can add ppa.launchpad.net, or other services you might use. After making changes to this file, you must run sudo restart squid-deb-proxy in order for the changes to be effective.


Manual Config

If for some reason you do not want to use zeroconf (for network reasons or whatever), you can manually set a client to use the proxy by editing /etc/apt/apt.conf and adding the following stanza, (replace the 0.0.0.0 with the IP address of the server):

 
Acquire {
Retries "0";
HTTP { Proxy "http://0.0.0.0:8000"; };
};
Using it

From then on all the machines on your network will check the cache before hitting the outside network to fetch packages. If there are new packages available then the first machine will download it from the net, after that subsequent requests for that package will come from the server to the clients.


TODO

We still need to enable apt to just use an advertised cache on the network out of the box and by default so you don't need to install the client piece. We also need to fix the bug that 403's deb's not in the mirror list.

More guides . . . . .

Exploring the Network Manager.

By default Network Manager is installed in Ubuntu and Kubuntu software packages. It is possible to switch between internet connections -- wireless or wired -- using the associated tray applet. In Ubuntu 12.04 LTS the default network manager is called Network Tools. It is accessable by searching for "network tools" in the dashboard search bar. 

Within the Network Tools applet we are able to execute many common networking tasks. Through the network devices tab it is possible to change the network device being used; from wired to wireless. Here we will also see the IP address as well as the subnet mask for each protocol that the device is using. We can also see total interface statistics, such as number of total bytes or packets transmitted over the course of the monitoring period.

 

Ubuntu 12.04