Many system administrators may be in the habit of re-booting their
systems to make partition changes visible to the kernel. With Linux,
this is not usually necessary. The partprobe command, from the parted
package, informs the kernel about changes to partitions.
Q. I am using vim under Ubuntu Linux and whenever I type following command:
syntax on
I’m getting an error which read as follows:
E319: Sorry, the command is not available in this version: syntax on
How do I fix this problem?
A. Vim is a text editor that is upwards compatible to Vi. It can be
used to edit all kinds of plain text. It is especially useful for
editing programs.
There are a lot of enhancements above Vi: multi level undo, multi
windows and buffers, syntax highlighting, command line editing,
filename completion, on-line help, visual selection, etc
Ubuntu Linux comes with tiny version of vim.
All you need to do is installed full vim version by typing following command:
$ sudo apt-get install vim
You can add syntax on command to ~/.vimrc file
http://www.cyberciti.biz/faq/howto-install-full-vim-under-ubuntu-linux/
1. Installing fonts for single login use
1a. using kfontview
1b. by hand
2. Installing fonts for system wide use
3. Installing Microsoft Windows Fonts (eg. Times New Roman)
1. Installing fonts for single login use
1a. using kfontview
The easiest way to install fonts is using kfontview. Try running “kfontview” from the command line.
If you do not have kfontview installed, as root run:
# apt-get install kcontrol
This will download a few dependencies, so if you are short on disk
space or simply do not want to install KDE, use the instructions in
step 1b
Run “kfontview” from the command line
From the kfontview window, open the font you have downloaded.
Click on the “Install” button
NOTICE: You will probably need to resize the window to see the “Install” button which is in the lower right hand corner.
Click on the “Personal” button
1b. by hand
If ~/.fonts does not exist, create it:
$ mkdir ~/.fonts
Copy the font, from the command line, run the following:
$ cp [fontfile] ~/.fonts
From the command line, run the following:
$ fc-cache -f -v ~/.fonts
or alternatively, log out, and log back in.
2. Installing for system wide use
Make the following directory as root:
# mkdir /usr/share/fonts/truetype/myfonts
Copy the font(s) into the newly created directory:
# cp [fonts] /usr/share/fonts/truetype/myfonts
(or use /usr/local/share/fonts)
Run the following:
# fc-cache -f -v
3. Installing Windows Fonts (eg. Times New Roman)
Make sure you have the “universe” repository added. If not, as root,
modify your /etc/apt/sources.list and uncomment the deb line which will
look something like this:
# deb http://us.archive.ubuntu.com/ubuntu dapper universe
Then update apt-get:
# apt-get update
Run the following as root:
# apt-get install msttcorefonts
/etc/modprobe.d/blacklist:
blacklist ipv6
http://ubuntu-tutorials.com/2007/11/18/how-to-disable-ipv6-on-ubuntu-710-gutsy-gibbon/
After having used Ubuntu and Debian for a real long time, and almost entirely through the command line, I thought I would post a quick reference of sorts for all package management related tools in one place .
I would definitely like to have community support for improving this, and am sure it will be helpful for all terminal junkies.
1. Listing of repositories
– Found at /etc/apt/sources.list
– Lines starting with # indicates comment
– Lines starting with deb indicate pre-packaged binaries
– Lines starting with deb-src indicate source. Can be commented for most users
2. Package management tools
– aptitude
– dpkg
– apt-cache
3. Updating index of repositories
sudo aptitude update
4. Searching for a package from the repos
aptitude search package-name
apt-cache search package-name
apt-cache search –names-only package-name
5. Listing all installed packages
dpkg –list | grep ^ii
You can further pipe it using grep to search for a installed package that matches some name
dpkg –list | grep ^ii | grep package_name
6. Install a .deb file you downloaded from the internet
sudo dpkg –install path_to_file_name
This is not always advised. First check with the package documentation if you have required dependancies, and it is always better to install from the repositories.
7. Install a package repo
If you know the package name, or if you know the package exists after a search as per 4 above,
sudo aptitude install package-name
This will pull all dependencies
8. Uninstalling a package
sudo aptitude purge package-name
aptitude remove package-name
The first one deletes everything including configuration files. The second one retains the configuration files.
9. Listing all files that a certain package installed in your system
dpkg –listfiles package-name
10. Finding out which package installed a file
If you know a file, and want to know which package installed it
dpkg –search filename
For example dpkg –search /etc/apache2/apache2.conf reveals apache2-common
11. Upgrading your system
sudo aptitude upgrade
This upgrades all packages installed using aptitude/apt-get or dpkg. Substitute upgrade with dist-upgrade for a more complete upgrade (can someone help me out here?)
12. Finding out which repo a package came from
apt-cache policy package_name
13. Changing configuration of a package
sudo dpkg-reconfigure package-name
14. Clear the cache of downloaded packages
sudo aptitude clean
sudo aptitude autoclean
15. Show informatoin about a package
aptitude show package-name
apt-cache show package-name
dpkg –info package-name.deb
The last one is for showing details of a package you downloaded online.
Other miscellaneous details
1. apt-get settings in /etc/apt. Change if you know what you are doing
You could
— Determine before hand how much configuration a package should undergo
— modify the gpg data of repositories
— Pin packages, that determine wheter or not you don’t want a package upgraded
2. Downloaded .deb files are stored in /var/cache/apt/archives
Delete them using 14
If required, admins please move this to another section as you see fit.
Edit #1: Thanks to Aysiu for pointing out requirement of root permisions.
Install libflashsupport_1.0~2219-1_i386.deb from:
I only found
one GUI alarm/timer in portage and it wasn’t exactly what I was looking
for (see wmtimer below) so I decided just to use cron.
Cron is a good solution for an alarm – it’s running all the time and
simple to setup. Once I learned to use it, I use it all the time.
The crontab application is used to work with cron jobs. The cron
daemon checks for cronjobs every minute. A command line mp3 player can
be used here but I use Audacious. Cron will need to be told what X
display to use for Audacious to play. Discover the current display by:
env | grep DISPLAY
Then as regular user edit crontab.
crontab -e
Here’s a simple comment to represent the cronjob layout:
# minute (0-59),
# | hour (0-23),
# | | day of the month (1-31),
# | | | month of the year (1-12),
# | | | | day of the week (0-6 with 0=Sunday).
# | | | | | commands
Enter the time (multiple times, days need to be separated with
commas) and script to execute for the alarm. The asterik can be used
(*) to satisfy all variables. Here’s mine for audacious:
07 21 * * 1,2,3,4,5 env DISPLAY=:0.0 audacious /home/user/My\ Music/Other/Alarms/301gq.mp3
I found some good alarm tracks at this site the were perfect for the task.
I like vim as my system editor but any can be used. In Gentoo edit the /etc/rc.conf to change it. To list the crontab.
crontab -l
Additional Information:
Gentoo Cron Guide
Ubuntu Wiki on Cron
gnome-schedule is a GUI utility for Gnome – in sunrise overlay.
A Gnome/python alarm clock
wmtimer
Wmtimer works just fine for Gnome users (KDE has kalarm) it leaves a
small window on the screen which can’t be hidden but it is able use the
system beep or execute a command on an alarm/timer event. Starting it
from the command line is pretty easy:
wmtimer -a -t 18:39:00 -e "mpg321 ~/Music/Other/Alarms/301gq.wav"
Update:Audacious also has alarm ability but it’s
buried deep in it’s preferences ( Preferences > Plugins > General
), I find using cron better.
http://linuxtidbits.wordpress.com/2008/01/19/cron-alarm-clock/
A nice feature enabled by default in Ubuntu 7.10 (Gutsy Gibbon) is the use of the libpam-gnome-keyring module.
Essentially what this means is that passwords and other information
stored in the Gnome Keyring are unlocked when you login.
This is especially handy if you connect to wireless networks, because the NetworkManager applet (nm-applet) stores the passphrase for accessing a network in the keyring.
I discovered a problem with this setup this morning however. If you
change your login password, the password for unlocking the keyring does
not change to the new password automatically. You need to change the
master password manually. A task that was surprisingly more complicated
than I expected.
After a lot of Internet searching, these are the steps I’ve come up with to change the master password for the keyring.
Next time you login the keyring will be automatically unlocked. This
is a solution that is a lot neater than deleting your keyring file and
making a new one, especially if you have a number of items stored in it.
I hope this procedure proves useful to others looking for a solution to this problem.
http://techxplorer.com/2007/10/28/changing-the-gnome-keyring-master-password/