0% found this document useful (0 votes)
93 views3 pages

My Tips On Ubuntu

The document provides instructions on how to enable syntax highlighting in vim by editing the vimrc file and removing quotes from the syntax on line. It also notes that syntax highlighting is enabled by default in newer versions of Ubuntu. Additional tips are given for colouring ls output, manpages, logging, diff outputs and more to improve the user experience in the terminal. Config files like bashrc and vimrc are mentioned as places to add configurations.

Uploaded by

Nima H Bahraini
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views3 pages

My Tips On Ubuntu

The document provides instructions on how to enable syntax highlighting in vim by editing the vimrc file and removing quotes from the syntax on line. It also notes that syntax highlighting is enabled by default in newer versions of Ubuntu. Additional tips are given for colouring ls output, manpages, logging, diff outputs and more to improve the user experience in the terminal. Config files like bashrc and vimrc are mentioned as places to add configurations.

Uploaded by

Nima H Bahraini
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

syntax hilighting

edit /etc/vim/vimrc the line have syntax on just delet the “ to enable syntax highlighting in vim
on marverick and lucid it’s on by default

KVM user Network (nat)


after generating kvm shell script with aqemu you could simply edit that read below doc for more
information and you should notice that kvm user network don’t let you to use ping (icmp)
http://www.linux-kvm.org/page/Networking

ssh -D 7001 -g -N -f [email protected]

http://xjqian.wordpress.com/2007/11/11/readwrite-ntfs-in-debian/

http://www.howtogeek.com/wiki/Mount_a_Windows_Shared_Folder_on_Linux_with_Samba

Colourful prompt
The Bash Prompt HOWTO is a good start with this.
Debian ships with this coloured prompt:
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\
[\033[00m\]\$ '
Jonathan Hitchcock recommends (well, Stefano added the chroot bit, but otherwise, Jonathan
recommends):
t

Colour-coded ls
In your .bashrc (which on a good Debian system is included from .bash_profile), add
# Nice colourful ls (CLUG-Wiki style)
if [ "$TERM" != "dumb" ]; then
eval "`dircolors -b`"
alias ls='ls --color=auto'
fi

Colourful manpages (RedHat style)


In your .bashrc (which on a good Debian system is included from .bash_profile), add
# For colourful man pages (CLUG-Wiki style)
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'

Coloured logging
$ apt-cache search log | egrep 'colou?r'
grc - generic colouriser for everything
lwatch - A simple log colorizer
ccze - A robust, modular log coloriser
loco - Perl script to add nice colors to your /var/log/messages file

Less with files containing ESC codes


less -R
eg grc cat /var/log/syslog | less -SR

Highlighting grep output


grep --color blah *
Of course, to make this more convenient, put this in your .bashrc
# Colourful grep
alias cgrep='grep --color'
Fill me out with details!

Colourful vim systax highliting


You can make these changes in one of two places:
# vi /etc/vim/vimrc # Systemwide
or
$ vi ~/.vimrc # Personal
Add (or uncomment)
syntax on
If you use a black-background terminal (which you should), also set
set background=dark

Colourful SPAM in mutt


Read Joe's mutt page, for some colourizing.

Colourful diff
Dave Ewart's colordiff, a Perl script wrapper for 'diff' which produces the same output but with
pretty 'syntax' highlighting.

MORE!
I want this page to be 2000 screenfulls long, add more, please!

Table
Work in progress...
× 1 2 3

1 1 2 3

2 2 4 6

3 3 6 9

4 4 8 12

5 5 10 15

aptitude install command-not-found


update-command-not-found

for supporting language persian on debian just find the locale file and the enable fa and the
locale-gen

on ubuntu to install persian featuers aptitude install persian

You might also like