Tag Archive for ubuntu

Mounting a windows share Ubuntu (CIFS)

$ sudo apt-get install smbfs
$ mkdir /media/shared
$ sudo mount.cifs //host/shared/ /media/shared/ -o username=user,domain=bla,ocharset=utf8,file_mode=0777,dir_mode=0777

source

Create Bootable USB Drive

diskutil list

diskutil unmountDisk /dev/diskN

sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m

diskutil eject /dev/diskN

source

Shell coloring

export PS1='[ 33[01;31m]u[ 33[01;33m]@[ 33[01;36m]h [ 33[01;33m]w [ 33[01;35m]$ [ 33[00m]'
export LS_OPTIONS="--human --color=always"

source

ruby on rails install in ubuntu

1.step----------------------

sudo apt-get install ruby-full build-essential libruby-extras libsqlite3-ruby

2.step---------------------

wget <a href="http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz" >http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz</a>
tar xzvf rubygems-1.3.5.tgz
cd rubygems-1.3.5
sudo ruby setup.rb

3.step--------------------

sudo gem install rails

source

Install native drivers for wireless card of Compaq V2401CL on Ubuntu 9.10

sudo apt-get install b43-fwcutter

source

Show installed software

dpkg -l

source

List of Ubuntu Packages

autoconf2.13
automake
bison
ccache
colordiff
cscope
ctags
cvs
diffstat
doxygen
flex-old
g++
gdb
git-core
graphviz
kcachegrind
latexmk
libbz2-dev
libfreetype6-dev
libgmp3-dev
libicu-dev
libjpeg-dev
libming-dev
libming-util
libpng-dev
libssl-dev
libt1-dev
libtidy-dev
libtool
libxml2-dev
libxpm-dev
libxslt-dev
lsof
mc
openssh-server
strace
sun-java6-jdk
texlive
texlive-lang-german
texlive-latex-extra
tofrodos
ubuntu-restricted-extras
valgrind
vim-full
zsh

source

Encrypt your /home partition

apt-get install cryptsetup
sudo modprobe dm-crypt
umount /home

cryptsetup --size 256 --cipher 'aes-cbc-essiv:sha256' luksFormat /dev/sda5
cryptsetup luksOpen /dev/sda5 luks-home
mkfs.ext3 /dev/mapper/luks-home

vi /etc/crypttab
luks-home       /dev/sda5       none    luks

vi /etc/fstab
/dev/mapper/luks-home /home     ext3 defaults,noatime        0       2

reboot

source

ubuntu – ID ports & running services

netstat -tunapl

source

apt-get completely uninstall a package

apt-get install deborphan debfoster

apt-get remove --purge <package name>
apt-get clean

# the later will clean the /var

debfoster

# will show files and libraries still left after the apt-get remove --purge
# if you don't recognize a library, keep it, later on, deborphan will
# give you a list of 'orphaned' libraries that are hanging with no use,
# and are safe to nuke.

# if you make a mistake with debfoster, type 'u' and will ask you again
# if you want to keep it. When you are thru with it, invoke deborphan.

deborphan

# will give a list of libraries that are hanging just taking space
# to get rid of them:

deborphan | xargs apt-get -y remove --purge

# when through with that:

apt-get clean

source