Opened one too many panes in tmux? You can kill one by selecting it and doing the following:
[prefix] x
By default the prefix is ctrl+b – so in this case you would enter ctrl+b then x.
Pane killed!
Opened one too many panes in tmux? You can kill one by selecting it and doing the following:
[prefix] x
By default the prefix is ctrl+b – so in this case you would enter ctrl+b then x.
Pane killed!
If you’re just starting out with tmux you may have installed it, set up a session, detached and then… what?
To re-join your detached session, simply run:
tmux attach
and you’re back in business.
If you’re used to screen you’ll be in the habit of using ctrl+a, for example detaching a session with ctrl+a then d – if you make the move to tmux it’s ctrl+b then d, which can take some getting used to. Often it’s easier to make tmux get used to you! To change tmux from ctrl+b to ctrl+a, make sure tmux isn’t running and create the following file:
vi ~/.tmux.conf
Here we have used the text editor vi to create the file. Now add the following:
unbind C-b
set -g prefix C-a
Save the file. Now the next time you start tmux it should have changed to what you’re used to!
This is another nice and easy one, though it may take a while depending on the size/speed of the tape:
sudo mt -f [/path/to/tape] erase
e.g.:
sudo mt -f /dev/st0 erase
That’s /dev/st(zero) not /dev/st(letter o), in case it’s not clear from the font. This will likely take some time as the tape is erased from end-to-end – once it is done you will be returned to a prompt.
This again uses the mt command, and is nice and easy:
sudo mt -f [path/to/tape/drive] rewind
A common example would be:
sudo mt -f /dev/st0 rewind
Easy done! In the above example it’s st (zero) not st (letter o) – in case it’s not clear from the font.
There are quite a few reasons you may find that you need to change your time zone – for example, if you’re using a pre-made image for a virtual machine you may find that the default timezone is not set to your country. You can change the time manually, though there is a quick and easy way:
sudo dpkg-reconfigure tzdata
This reconfigures the tzdata (timezone data) package and runs you through a series of prompts asking which country/city you live in, and updates the time accordingly.
You can check the current system time with:
date
to verify that it worked!
This is another error that seems to crop up when making Xen on Ubuntu – you can fix it by installing the texinfo package:
sudo apt-get install texinfo
The error message should now no longer appear.
This error cropped up when we were building Xen on a system running Ubuntu 12.04 Server:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
To get past this point, install gcc-multilib.
sudo apt-get install gcc-multilib
The required files are around 20MB and should allow you to get past that point of “make”.
In Ubuntu 12.04 and 12.10, to delete an additional user you have created, use the following:
sudo deluser [username]
By example, if we wanted to delete a user we created called “test”, we would run:
sudo deluser test
Which gives:
Removing user `test’ …
Warning: group `test’ has no more members.
Done.
Be careful with this – don’t delete your admin account 🙂
To add an existing user to a second group, use the following command:
sudo usermod -a -G [group] [user]
e.g.:
sudo usermod -a -G geeks bob
This will add the user bob to the group geeks.