Friday, January 10, 2014
So you forgot your Ubuntu password ???
http://www.howtogeek.com/howto/linux/reset-your-forgotten-ubuntu-password-in-2-minutes-or-less/
Monday, January 03, 2011
HOWTO : Find out if you have a 64 bit Ubuntu or a 32 bit one ?
uname -m
i686 = 32 bit
Wednesday, December 29, 2010
Start X from shell, Ubuntu
sudo /etc/init.d/gdm start
sudo /etc/init.d/kdm start
Second method, type startx command :
startx
If nothing works, type xinit to star X server without KDE:
xinit
Now start kde with following :
startkde
Tuesday, December 28, 2010
add a user to Ubuntu from Shell/terminal
passwd userName
cd /home
ls -l
mkdir scheiber ----> if it already does not exist
chmod 0700 scheiber
chown -R scheiber:scheiber scheiber
Tuesday, December 14, 2010
List of people available in one IRC chat channel
- List of people available in one IRC chat channel
/who
- Gives the real name of the given nickname/username
/who nickname
Monday, October 18, 2010
Show Line numbers in VIM
Press Esc and write
:set number
Friday, June 18, 2010
Wednesday, April 07, 2010
How to open Gnome terminal in full screen mode
Make a shortcut on your top panel.
Right click on the Terminal icon up there and click properties.
Then in the command box instead of just "gnome-terminal" type the following :
gnome-terminal --full-screen
Saturday, November 14, 2009
Giving your screen session a name
Wednesday, November 11, 2009
Vim/Vi command sheet
Cursor movement
- h - move left
- j - move down
- k - move up
- l - move right
- w - jump by start of words (punctuation considered words)
- W - jump by words (spaces separate words)
- e - jump to end of words (punctuation considered words)
- E - jump to end of words (no punctuation)
- b - jump backward by words (punctuation considered words)
- B - jump backward by words (no punctuation)
- 0 - (zero) start of line
- ^ - first non-blank character of line
- $ - end of line
- G - Go To command (prefix with number - 5G goes to line 5)
Note: Prefix a cursor movement command with a number to repeat it. For example, 4j moves down 4 lines.
Insert Mode - Inserting/Appending text
- i - start insert mode at cursor
- I - insert at the beginning of the line
- a - append after the cursor
- A - append at the end of the line
- o - open (append) blank line below current line (no need to press return)
- O - open blank line above current line
- ea - append at end of word
- Esc - exit insert mode
Editing
- r - replace a single character (does not use insert mode)
- J - join line below to the current one
- cc - change (replace) an entire line
- cw - change (replace) to the end of word
- c$ - change (replace) to the end of line
- s - delete character at cursor and subsitute text
- S - delete line at cursor and substitute text (same as cc)
- xp - transpose two letters (delete and paste, technically)
- u - undo
- . - repeat last command
Marking text (visual mode)
- v - start visual mode, mark lines, then do command (such as y-yank)
- V - start Linewise visual mode
- o - move to other end of marked area
- Ctrl+v - start visual block mode
- O - move to Other corner of block
- aw - mark a word
- ab - a () block (with braces)
- aB - a {} block (with brackets)
- ib - inner () block
- iB - inner {} block
- Esc - exit visual mode
Visual commands
- > - shift right
- < - shift left
- y - yank (copy) marked text
- d - delete marked text
- ~ - switch case
Cut and Paste
- yy - yank (copy) a line
- 2yy - yank 2 lines
- yw - yank word
- y$ - yank to end of line
- p - put (paste) the clipboard after cursor
- P - put (paste) before cursor
- dd - delete (cut) a line
- dw - delete (cut) the current word
- x - delete (cut) current character
Exiting
- :w - write (save) the file, but don't exit
- :wq - write (save) and quit
- :q - quit (fails if anything has changed)
- :q! - quit and throw away changes
Search/Replace
- /pattern - search for pattern
- ?pattern - search backward for pattern
- n - repeat search in same direction
- N - repeat search in opposite direction
- :%s/old/new/g - replace all old with new throughout file
- :%s/old/new/gc - replace all old with new throughout file with confirmations
Working with multiple files
- :e filename - Edit a file in a new buffer
- :bnext (or :bn) - go to next buffer
- :bprev (of :bp) - go to previous buffer
- :bd - delete a buffer (close a file)
- :sp filename - Open a file in a new buffer and split window
- ctrl+ws - Split windows
- ctrl+ww - switch between windows
- ctrl+wq - Quit a window
- ctrl+wv - Split windows vertically
Sunday, November 08, 2009
copying folder in Linux / Unix terminal
cp -r /original/dir /copied/dir
Saving and quiting at Vim
After finishing, you are supposed to save what you have written. So you press Esc button and then write :w. Then you can simply write :q to quit.
Pay attention that you can write commands(:w, :q, ...) in the command line and you can go to command line by pressing Esc button in Vim.
Good luck, it is a powerful editor, but as me, you got a long way a head to learn how to work with it.
Saturday, November 07, 2009
Showing Line Number while editing a file in Vi or Vim
:set number
to have line numbers beside your editor. If you are tired of line numbers, enter the following to turn them off:
:set nonumber
Wednesday, September 30, 2009
chmod Recursive permission change (i.e. in the directory and its sub-directories)
chmod -R 777 (folder name)
in case you got the error that you do not have permission, you have to login as root(su command and then password)at Ubuntu run :
sudo chmod -R 777 (folder name)
Tuesday, September 29, 2009
compiling and installing software from Source Code
Typically applications you must compile from source will come as a ".tar.gz", ".tar.bz2", or ".zip" file.
You'll probably want to operate from inside your home directory. If your user is (for example) username, your home directory will be /home/username/. For the rest of this section we will assume you have downloaded your zip file to /home/username/src. If you do not have a src directory, you can create it with the following "mkdir" (make directory) command:
mkdir /home/username/src/
Change to the /home/username/src/ directory with the "cd" (change directory) command like so:
cd /home/username/src/
ls
We now need to unzip the zipped file, this is done differently depending on the file extension.
for files ending in .tar.gz, use:
tar -zxvf
for files ending in .tar.bz2, use:
tar -jxvf
unzip
ls
cd
This is where things will differ. Some packages will have an INSTALL or README file which will contain installation instructions. use "ls" to see if the software has an install or readme file. If it does have one, you can use the "more" command to read it, like so:
more INSTALL
- Configure the installation
- Compile the software
- Install the binaries
The pre-installation configuration is done by executing ./configure:
./configure
The next stage is to compile the software, this is done using "make". When you run "make" it will read the instructions in the Makefile and build the application binaries.
make
The final stage is to install these binaries, ie, copy them to a more permanent location. Typically only the "root" user can do this, so you will need to swich to the root user with the "su" command:
su
make install
Remember that if you have any problems, please post in the most relevant section of the forums. - When posting, remember to include as much info as possible, including all output and error messages.
SOURCE
Saturday, September 26, 2009
RAR @ Fedora ...
By default, Rar is not available in Fedora 10. If all you need to do is extract files from a Rar archive, unrar from RPM Fusion's YUM repositories will work. If you need to create Rar archives, then you will have to download and install the complete Rar package from DAG. The instructions below show you how.
Only Need to Extract Files?
First, install RPM Fusion's free and nonfree YUM repositories. For detailed information about installing RPM Fusion, see: http://rpmfusion.org/Configuration
su -c "rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm"
su -c "rpm -Uvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm"
Next, install the unrar packages from RPMFusion's nonfree repository.
su -c "yum install unrar"
Done! You now have unrar in /usr/bin/unrar. This binary can only extract files from Rar archives. Use this command to see all available options:
/usr/bin/unrar -?
Need to Create Rar Archives?
First, download the source RPM from DAG: http://dag.wieers.com/rpm/packages/rar
wget -c http://dag.wieers.com/rpm/packages/rar/rar-3.5.1-1.rf.src.rpm
Now, install the source RPM. This will create a $HOME/rpmbuild tree. Please note that you do not need to be root.
rpm -iv rar-3.5.1-1.rf.src.rpm
Next, build a binary package in $HOME/rpmbuild. Again, no need to be root.
rpmbuild -bb ~/rpmbuild/SPECS/rar.spec
Finally, install the built RPM as root:
su -c "rpm -Uvh $HOME/rpmbuild/RPMS/$(arch)/rar-3.5.1-1.rf.x86_64.rpm"
Done! You now have rar in /usr/bin/rar. This binary can build and extract Rar files. Use this command to see all available options:
/usr/bin/rar -?
Thursday, September 24, 2009
Flash Fix @ Ubuntu ...
sudo apt-get remove swfdec-mozilla
sudo apt-get remove mozilla-plugin-gnash
sudo apt-get remove adobe-flashplugin
sudo apt-get remove flashplugin-nonfree
Nevertheless, I believe your problems is due to conflicting plugins. So before trying to remove all flash plugins, try this(IT WORKED FOR ME):
sudo apt-get remove swfdec-mozilla
sudo apt-get remove mozilla-plugin-gnash
sudo apt-get remove adobe-flashplugin
sudo apt-get remove flashplugin-nonfree
sudo apt-get install flashplugin-nonfree
You can also try to improve your flash experience using my tutorial Firefox optimization and troubleshooting thread.
Source : Ubuntu Forums
Saturday, September 05, 2009
VLC on Feodra ...
#> rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
#> yum install vlc
#> yum install mozilla-vlc (optionnal)
Monday, August 31, 2009
Rar files, Linux
Open a terminal and run following commands :
sudo apt-get install rar
sudo ln -fs /usr/bin/rar /usr/bin/unrar
After that you can find Archive Manager in the Gnome menu under Applications -> Accessories.
Saturday, August 29, 2009
Your IP @ Ubuntu
#sudo ifconfig (eth0:for cable, or wlan0;for wireless)


