Category Archives: Linux - Page 3

adduser ubuntu

useradd -s /bin/bash -m -d /home/[USER] [USER]

bash PS1

PS1='\[\033[0;37m\][\t]\[\033[0;32m\][\u]\[\033[31m\][\h]`git branch 2>/dev/null | grep \* | head -1 | sed "s/\* //g" | awk "{ print \"[ \"\\\$1 \" ]\" }"` \[\033[1;33m\]\w\a\[\033[0m\]\n\$ '

Install Ruby Gem

tar xzvf rubygems-1.8.21.tgz
cd rubygems-1.8.21/
ruby setup.rb
gem update --system

Alias for cd ../ (terminal)

shopt -s autocd

Install Ruby 1.9.3 with libyaml

tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
make install
tar xzvf ruby-1.9.3-p0.tar.gz
cd ruby-1.9.3-p0
./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
make install


ruby -v
gem --version

untar files on terminal

tar -C path/to/folder -zxvf file.tar.gz

Custom launcher in Ubuntu 11.10

Run this on terminal

gnome-desktop-item-edit ~/Desktop/ --create-new

Drag the desktop item that was created to the Launcher.

Install .deb package on terminal

sudo dpkg -i path/to/package.deb

zip files on terminal

zip -r /path/to/ /path/where/the/files/are/placed/

svn ignore

1 – go to folder where your files are placed

2 – Edit the properties for the current directory

svn propedit svn:ignore .

3 – Add the files or patterns ex:

Ignores all .conf files on the current directory


4 – Save your file (^X if you’re using nano)

5 – Confirm what you did (you can skip this)

You can see your property

svn propget svn:ignore .

You should see an ‘I’ next to the ignored files

svn status --no-ignore

6 – Commit your changes

svn commit -m 'svn ignore'

Now you can ask:
- Ok, but if I want to undo these changes or add some new files or patterns?

I say: Easy!

- If you and to add new files or patterns: Repeat all above steps (1 – 6)

If you want do undo these changes, you need to go to your directory and type:

svn propdel svn:ignore
Page 3 of 41234