Computing

Computers and information management topics

I'm unclear how well any of this works, but for reference some ideas around wifi power control in Linux.

First, create the file to be used. It should be a single block on the drive. This will create a file (swapfile) of size 100 MB as a large block.

dd if=/dev/zero of=/swapfile bs=1024 count=100000

Next, add the newly created file to the swap pool.

mkswap /swapfile

Finally, turn on the new swapfile.

swapon /swapfile

Now you have 100 more Mbytes of swap memory.

Here's a few methods to determine useful information regarding install packages, files and applications on a Ubuntu Linux system.

List installed software: dpkg -l ... or ... dpkg --get-selections

Find the package(s) that include a specific file: dpkg -S <filename>
Example: dpkg -S top

List files installed from a package: dpkg -L <packagename>

Solution 1

cat /etc/issue

Solution 2

lsb_release -a or cat /etc/lsb-release

If the network hardware or virtual environment (NIC) changes mac number Ubuntu will reserve the prevously used device name and assign the next higher device number to the "new" hardware.

For example, a machine with one NIC assigned eth0 changes the NIC hardware. On the next reboot, Ubuntu will reserve eth0 for the missing hardware and assign the new NIC as eth1.

To fix this and reset Ubuntu's memory so that the new hardware is assigned eth0, remove the file /etc/udev/rules.d/70-persistent-net.rules where the assignments are recorded.

dmidecode is a tool for dumping a computer’s DMI (some say SMBIOS) table contents in a human-readable format. Generally this will include all the important hardware in the computer.

lspci is a utility for displaying information about all PCI buses in the system and all devices connected to them. In particular, lspci -vvv can be very useful displaying information about many hardware items in the computer.

Some other basic commands that provide information on the hardware Linux is running on.

Most Adobe Flash applications that have a fullscreen mode will exit back to their original in-webpage state when the fullscreen window looses the focus (or is not the active window). This is fine on a single monitor setup but a real pain on a dual or multi-monitor system. Often the user would like to watch a Flash based movie on one monitor (e.g., Youtube) and continue working (e.g., browse the web) on another.

Use the update-alternatives command.

In a terminal window and type in the following command:

sudo update-alternatives --config editor

Here's an example of what you'll see:

$ sudo update-alternatives ––config editor

There are 5 alternatives which provide `editor'.

  Selection  Alternative
––––––––––––––––––––
           1 /usr/bin/vim
           2 /bin/ed
        *+ 3 /bin/nano
           4 /usr/bin/vim.basic
           5 /usr/bin/vim.tiny
Press enter to keep the default[*], or type selection number:

These are specified in RFC1597 and are as follows:


Reserved Private Network Allocations
Network Class  Netmask  Network Address 
A 255.0.0.0 10.0.0.0 - 10.255.255.255
B 255.255.0.0 172.16.0.0 - 172.31.255.255
C 255.255.255.0 192.168.0.0 - 192.168.255.255

At installation Dovecot creates a self-signed certificate that will expire in one year. Often your server installation will be in place longer than this. So, one solution is to create a new certificate that expires in 5 years. To do so follow these instructions.

Two common Linux based firewall systems that I have used are IPCop and IPFire. IPCop appears to be no longer a going project. IPFire appears to be based on either IPCop or it is a fork of IPCop but I'm not sure. IPFire is a going project with regular updates, new add-ons and growth. Both have local domain name systems (DNS) used to gather domain information and cache it locally for the benefit of the system inside, or on the green network, of the firewall. Each uses a different solution but with each there is a need from time-to-time where you'd like to flush the local DNS cache. Procedures to do so are shown below.