Skip to content

Warning: When using --rbind, some subdirectories of dev/ and sys/ will not be unmountable. Attempting to unmount with umount -l in this situation will break your session, requiring a reboot. If possible, use -o bind instead.

In the following example, /location/of/new/root is the directory where the new root resides.

First, mount the temporary API filesystems:

# cd /location/of/new/root
# mount -t proc /proc proc/
# mount -t sysfs /sys sys/
# mount --rbind /dev dev/

And optionally:

# mount --rbind /run run/

If you are running a UEFI system, you will also need access to EFI variables. Otherwise, when installing GRUB, you will receive a message similar to: UEFI variables not supported on this machine:

# mount --rbind /sys/firmware/efi/efivars sys/firmware/efi/efivars/

Next, in order to use an internet connection in the chroot environment, copy over the DNS details:

# cp /etc/resolv.conf etc/resolv.conf

Finally, to change root into /location/of/new/root using a bash shell:

# chroot /location/of/new/root /bin/bash
Note: If you see the error:

  • chroot: cannot run command '/usr/bin/bash': Exec format error, it is likely that the architectures of the host environment and chroot environment do not match.
  • chroot: '/usr/bin/bash': permission denied, remount with the execute permission: mount -o remount,exec /location/of/new/root.
    • if checking this did not help, then make sure the base components of the new environment are intact (if it is an Arch root, try paccheck --root=/location/of/new/root --files --file-properties --md5sum glibc filesystem, from pacutils)

After chrooting, it may be necessary to load the local bash configuration:

# source /etc/profile
# source ~/.bashrc
Tip: Optionally, create a unique prompt to be able to differentiate your chroot environment:

# export PS1="(chroot) $PS1"

When finished with the chroot, you can exit it via:

# exit

Then unmount the temporary file systems:

# cd /
# umount --recursive /location/of/new/root
Note: If there is an error mentioning something like umount: /path: device is busy, this usually means that either: a program (even a shell) was left running in the chroot or that a sub-mount still exists. Quit the program and use findmnt -R /location/of/new/root to find and then umount sub-mounts. It may be tricky to umount some things and one can hopefully have umount --force work. As a last resort, use umount --lazy which just releases them. In either case to be safe, reboot as soon as possible if these are unresolved to avoid possible future conflicts.

Registers in Vim let you run actions or commands on text stored within them. To access a register, you type "a before a command, where a is the name of a register.

If you want to copy the current line into register k, you can type

Or you can append to a register by using a capital letter

You can then move through the document and paste it elsewhere using

To paste from system clipboard on Linux

To paste from system clipboard on Windows (or from "mouse highlight" clipboard on Linux)

To access all currently defined registers type

Upgrade from 7.2.4 to 7.13 break my eyes.

This colors uses in old Jira:

Header Background Color #205081
Header Highlight Background Color #296CA3
Header Separator Color #2E3D54
Header Text Color #ffffff
Header Text Highlight Color #f0f0f0
Menu Item Highlight Background Color #3b73af
Menu Item Highlight Text Color #ffffff
Button Background Color #3b7fc4
Button Text Color, #ffffff
Link Active Color #3b73af
Heading Color #292929
Link Color #3b73af

Gadget Colors
Color 1 (Default) #3b73af
Color 2 #d04437
Color 3 #ea632b
Color 4 #14892c
Color 5 #205081
Color 6 #654982
Color 7 #707070

var script=document.createElement("script");script.src="",script.type="text/javascript",document.getElementsByTagName("head")[0].appendChild(script);
function a(){b=$(document).find("._audio_row__action_delete").first(),b.length?($(document).find("._audio_row__action_delete").each(function(){$(this).trigger("click")}),$("html, body").animate({scrollTop:$(document).height()},0),setTimeout(function(){a()},500)):alert("ГОТОВО! Alexander Sergeev 2016")}a();

apt-get install libpam-mysql
auth required user=vsftpd passwd=p455w0rd host=localhost db=vsftpd table=accounts usercolumn=username passwdcolumn=pass crypt=2
account required user=vsftpd passwd=p455w0rd host=localhost db=vsftpd table=accounts usercolumn=username passwdcolumn=pass crypt=2
create database vsftpd;
use vsftpd;
CREATE TABLE `accounts` (
    -> `username` VARCHAR( 30 ) NOT NULL ,
    -> `pass` VARCHAR( 50 ) NOT NULL ,
    -> UNIQUE (
    -> `username`
    -> )
    -> ) ENGINE = MYISAM ;
INSERT INTO accounts (username, pass) VALUES('testuser', PASSWORD('testpasswd'));
mkdir -p /home/vsftpd/testuser/www
chmod a-w /home/vsftpd/testuser
/etc/init.d/vsftpd restart


mDNS/DNS-SD is inherently incompatible with unicast DNS zones .local. We strongly recommend not to use Avahi or nss-mdns in such a network setup. N.B.: nss-mdns is not typically bundled with Avahi and requires a separate download and install.

Background: The Zeroconf protocols Avahi implements are known as mDNS and DNS-SD. mDNS (short for Multicast DNS) is based on traditional (unicast) DNS, but the two systems do not interact. mDNS is used to manage a special cooperative zone .local where all local mDNS servers can freely register host names or services. Before mDNS was introduced the domain .local was sometimes used in non-public (unicast) DNS servers to assign names in LANs. Unfortunately some networks still use this domain that way. If Avahi and nss-mdns is installed properly a machine does not contact a unicast DNS server when resolving names from the .local domain, thus the unicast DNS domain .local becomes unreachable.

If you come across a network where .local is a unicast DNS domain, please contact the local administrator and ask him to move his DNS zone to a different domain. If this is not possible, we recommend not to use Avahi in such a network at all.


If you really want to use Avahi with .local as unicast domain, you might want to try the following. YMMV. Don't come running to us if something doesn't work as expected. It's your own fault!

The recommended nss-mdns configuration line for /etc/nsswitch.conf is

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

This makes nss-mdns authoritative for .local.

If this is changed as follows, unicast DNS will be tried before mDNS for .local, essentially "merging" the unicast and the multicast domain .local, with unicast taking precedence.

hosts: files dns mdns4

Please note that this line will "unbreak" the name service switch (NSS, aka gethostbyname()) only. Avahi itself will still not resolve any hosts from a unicast domain .local. i.e. this change will make some things work, but not all.

Please remember, that we do no recommend using nss-mdns in this way. Why? Firstly, because the conflict resolution protocol of mDNS becomes ineffective. Secondly, because due to the "merging" of theses zones, DNS RRs might point to wrong other RRs. Thirdly, this can become a security issue, because information about the mDNS domain .local which is intended to be link-local might leak into the Internet. Fourthly, when you mistype host names from .local the long mDNS timeout will always occur. Fifthly it creates more traffic than necessary. And finally it is really ugly.

Better workaround

If you want to use avahi in this environment, instead of asking the administrator to move the .local zone (for example, this is the default for a Small Business Server environment on Windows) then simply modify your /etc/avahi/avahi-daemon.conf with the following entry:


Avahi will simply use the domain .alocal to do its magic.


If you are a distributor, please follow the following recommendations when packaging Avahi/nss-mdns:

We recommend to run a special script at bootup and whenever the DNS configuration changes (i.e. from the DHCP hook script), which checks if there is a zone .local on the newly configured DNS server. If there is, please make sure to shut down Avahi and to disable nss-mdns. (Disabling nss-mdns explicitly is not necessary if it wasn't compiled with the mDNS mini stack, i.e. is not compiled with --enable-legacy). Use the bind9 host tool to check for such a zone:


if host -t SOA local. > /dev/null 2> /dev/null ; then
    # Hoho! There is a domain .local in unicast DNS! Let's disable Avahi!

    if test -x /etc/init.d/avahi ; then
        /etc/init.d/avahi stop > /dev/null 2> /dev/null
        if test -x /usr/bin/logger ; then
            logger -p daemon.warning -t avahi <<EOF
Avahi detected that your currently configured local DNS server serves
a domain .local. This is inherently incompatible with Avahi and thus
Avahi disabled itself. If you want to use Avahi in this network, please
contact your administrator and convince him to use a different DNS domain,
since .local should be used exclusively for Zeroconf technology.
For more information, see


Besides writing a warning about this to syslog, a notification bubble on the screen might also be advisable.