Tuesday, February 25, 2014

How to Installing Ubuntu on windows 8 ; Guide tutorial



In this post I will show the step by step procedure  to install Ubuntu  as a dual boot OS on Windows 8 system.

  • The first step to install Ubuntu (Linux) was to creat a partition on my existing hard drive.
  • Making Space using "Shrink Disc" feature in windows 8.
    • Right-Click on "My computer" in the main menu and select "Manage" 
    • It will ask for administrator permission, click "yes".
    • Click on Disc Management.On right side of the menu.
    • There is will show the available partitions and external storage devices if any
    • Right Click on the disc partition you want to shrink and select "shrink volume" (/here i suggest you to select D or E drive to shrink).
    •  Windows 8 will assess how much space can be made free
    • It will suggest the value which can be made free. Be sure that this is at least 10-15 GB. If you dont have this space, you will have to delete some data to make space for the partition.
    • Then select "shrink"
    • Vista will shrink the volume and show the new freed space as "unallocated" space.
    • After this close the window. You are done with shrinking .
     
  • The next step is to install Ubuntu.
    • You will need to download the latest ISO for Ubuntu  from here:
    • http://www.ubuntu.com/download/desktop 
    • You will need to burn this ISO image on to a CD.
    • For burning this ISO you will have to use an ISO burning software. One such free software is: Free ISO burner: http://www.freeisoburner.com/ 
    • Be sure to burn the ISO image at a very slow speed. This extra time spent will help you install Linux trouble-free.
    • When the disc is ready, restart the computer. Be sure that in BIOS setup the CD drive is above the hard disc in boot priority.
    • Once restarted the disc will boot before the hard disc.
    • In the menu that is displayed, select "run installer" and follow the instructions.
    • Once you have selected language, Location and Keyboard configuration....the disk partitioner of ubuntu will run and show you various options as to where Ubuntu should be installed.
    • Select "Largest continuous free space" as this will select the "unallocated space" that we have created in the earlier step by shrink tool.
    • After this follow the next instructions to complete the installation.
    • Complete the installation. It will prompt to restart the computer. Do so.
    •  After restart, the menu will show Ubuntu and Windows 8 a dual boot OS and now you are free to choose the OS you want to load.

     

Friday, January 24, 2014

Cygwin complete Commands on Windows

Cygwin on Windows

Commands in Course Order:

Command
Usage
Comment
pwd
pwd
Print your current directory (folder) location
ls
ls
List the files in the current folder
mkdir
mkdir  Blast
Make a new folder.  Example Blast
cd
cd  /Blast
Change to another folder like Blast
cd
cd  c:/
Change to C drive
cd
cd   /
Change to the root directory.  Cygwin files are here
man
man  pwd
Show the manual pages for all command
cat  >
cat  >  file1
Create file1 and write data to it
cat  >>
cat  >>  file1
Add new lines to the bottom of file1
cat
cat  file1
Show/display contents of file1 to the screen
cat
cat  file1  file2
Show/display contents of file1 and file2 to the screen
sort
sort  file1
Sort the contents of file1
sort
sort  file1  file2
Sort the contents of file1 and file2 together
alias
alias  dog = “cat”
Assign the work dog to the cat command
alias
alias  path = “/BioDownload/bin/”
Type path instead of /BioDownload/bin/
|
cat  file1  file2  |  sort
Called Pipe.  Places output of cat into sort
head
head  TA496Seq1
View the first few lines of a file, especially a large file
tail
tail  TA496Seq1
View the first few lines of a file, especially a large file
less
less   TA496Seq1
View a large file and control the output
cp
cp  file1  file2_copy
Make a copy of file1 and call it file2_copy
cp
cp  file1  /Bioinfo
Make a copy of file1 and place it in the folder Bioinfo
cp
cp  file1  /Bioinfo/cp_test
Copy file1 into the folder Bioinfo and call it cp_test
mv
mv  file1  /Bioinfo
Move file1 into the folder Bioinfo
rm
rm  file1
Permanently delete file1
rm
rm  /Bioinfo/file2
Delete file2 which is located in the Bioinfo folder
rmdir
rmdir  /Bioinfo
Remove the folder called Bioinfo
grep
grep  “ATG”  file1 
Search for ATG in file1
grep
grep  “ATG”  file1  file2
Search for ATG in file1 and file2
grep
grep  -i  “ATG”  file1
Search for ATG in file1 regardless of case:  Atg, atg, ATg, and so on
grep
grep  -ic  “ATG”  file1
Search but return only a count of occurrences of all ATG
grep
An excellent reference
www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/

Commands in Alphabetical Order
Command
Usage
Comment
|
cat  file1  file2  |  sort
Called Pipe.  Places output of cat into sort
alias
alias  dog = “cat”
Assign the work dog to the cat command
alias
1alias  pathx = “/BioDownload/bin/”
Type pathx instead of /BioDownload/bin/
cat
cat  file1
Show/display contents of file1 to the screen
cat
cat  file1  file2
Show/display contents of file1 and file2 to the screen
cat  >
cat  >  file1
Create file1 and write data to it
cat  >>
cat  >>  file1
Add new lines to the bottom of file1
cd
cd  /Blast
Change to another folder like Blast
cd
cd  c:/
Change to C drive
cd
cd   /
Change to the root directory.  Cygwin files are here
cp
cp  file1  file2_copy
Make a copy of file1 and call it file2_copy
cp
cp  file1  /Bioinfo
Make a copy of file1 and place it in the folder Bioinfo
cp
cp  file1  /Bioinfo/cp_test
Copy file1 into the folder Bioinfo and call it cp_test
grep
grep  “ATG”  file1 
Search for ATG in file1
grep
grep  “ATG”  file1  file2
Search for ATG in file1 and file2
grep
grep  -i  “ATG”  file1
Search for ATG in file1 regardless of case:  Atg, atg, ATg, and so on
grep
grep  -ic  “ATG”  file1
Search but return only a count of occurrences of all ATG
grep
An excellent reference
www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/
head
head  TA496Seq1
View the first few lines of a file, especially a large file
less
less   TA496Seq1
View a large file and control the output
ls
ls
List the files in the current folder
man
man  pwd
Show the manual pages for all command
mkdir
mkdir  Blast
Make a new folder.  Example Blast
mv
mv  file1  /Bioinfo
Move file1 into the folder Bioinfo
pwd
pwd
Print your current directory (folder) location
rm
rm  file1
Permanently delete file1
rm
rm  /Bioinfo/file2
Delete file2 which is located in the Bioinfo folder
rmdir
rmdir  /Bioinfo
Remove the folder called Bioinfo
sort
sort  file1
Sort the contents of file1
sort
sort  file1  file2
Sort the contents of file1 and file2 together
tail
tail  TA496Seq1
View the first few lines of a file, especially a large file


1Note:  there are certain words that are reserved as “commands”.  For example we could not use “path” as an alias, but we could use “pathx”.

Basic Cygwin commands

Here are some basic Unix commands for navigating and exploring data:

Listing files and folders, type:


ls           - Lists the files and folders in the current directory
ls -lt      - Lists more information about all the files/folders in the current                              directory, one file/folder per line

Pattern matching

Example: 

1) ls time*? will list every file that starts with the word time while the command
ls time*.dat will match everything in the folder that begins with time and ends with .dat .

2) Tab            - The Tab button will complete the name of a file or folder if it is unique.  For example, if there is only one file that begins with untitled-2 then simply typing ls untitled-2 (Tab) will complete the file without having to type the rest of the letters. This saves a lot of time when most of the files are unique. 

3) Ctrl d         - This is typed if you have finished typing part of a filename and you need to find out which files have that same beginning part in their names.  For example, typing ls -untitled-2 (Ctrl d) will display all the files that have that beginning of the filename untitled-2.  After typing this, you can see what the exact name of the file you wish is named and type in the rest of the name.  When you combine Ctrl d with the Tab button, you typically only need to type a few letter per name, even if it is long.  This saves a considerable amount of time. 

4) Up arrow    - Typing the up arrow on the command line will show you the last command that was executed.  You can just modify this one or run it again to see the results of the same or new file. 

Changing folders/manipulation of folders


cd folder-name             - folder-name is the name of the folder you want to move to
pwd                                      - Displays what folder you are currently in
mkdir                                    - Creates a folder (directory)
rmdir                                    - Removes a folder (directory) but it must be empty
Changing/moving file/filenames
cp old-filename new-filename        - Copies the old file to the new filename without erasing the old file
mv old-filename new-filename        - Changes the old file to the new filename and erases the old file
rm filename                                    - Removes the filename you type

Printing a file

Cygwin users:  You can open regular text files in MS Word and save and print them normally. 

Viewing contents of a file

vi filename                     - vi is a visual program to view the text in a file such as the results from a program. 
head filename                - Shows the first 10 lines of a file
tail filename                - Shows the last 10 lines of a file. 

Executing/Stopping programs

To execute a program, you only need to type its name.  You may need to type ./ before the name, if your system does not check for executables in that file.
Ctrl c                     - This command will cancel a program that is running or wont automatically quite.  It will return you to the command line so you can run something else. 
vi program
Once you type the command above, the window will display the text.  Unlike a regular document program, vi does not let you just type using the keyboard.  Instead, each key has a function, such as move the cursor left or down.  Here are the basic commands you can use to edit and save the commands.  You can use the arrow keys just like normal, and must be used to move the cursor to the place you want to start typing/editing.  The mouse will not work in the standard vi program, only the keyboard is used.  This takes some getting used to. 
i                      - insert is similar to a but is to the left of where the cursor is.

a                      - appends to the data, after typing a you can use the keyboard to type in letter/numbers like a normal word processing program.  When you are done typing what you want at that location, you need to hit the Esc button before you can return to the regular mode. 

Esc                 - escape ends the current mode you are in (i.e. typing mode) and takes you back to the original.

x                      - Typing x lowercase will erase the character on the cursor, like the Backspace key does in a normal word processing program.  The Delete button will do the same thing in the regular mode.

:w                   - saves all the changes you made to a existing file name.

:w new-filename           - saves all the changes you made to a new filename you specify.

ZZ                   - Capital ZZ.  This will save and quit the vi program and bring you back to the command line.

:q!                 - This will quite the vi program without saving the last changes you made.

u                      - This is undo, and will undo the last action you have completed.

dd                   - This will erase the entire line.  Tying a number before typing dd will remove the number of lines chosen.

:se nu         - This is to set number lines which will temporarily number the lines of the document for you.

Ctrl f         - This will page down the document by one screen length.

Ctrl b         - This will page up the document by one screen length.

G                      - This will move the cursor to the end (bottom) of the document

1G                   - This will move the cursor to the top of the document

How to Installing Ubuntu on windows 8 ; Guide tutorial



In this post I will show the step by step procedure  to install Ubuntu  as a dual boot OS on Windows 8 system.

  • The first step to install Ubuntu (Linux) was to creat a partition on my existing hard drive.
  • Making Space using "Shrink Disc" feature in windows 8.
    • Right-Click on "My computer" in the main menu and select "Manage" 
    • It will ask for administrator permission, click "yes".
    • Click on Disc Management.On right side of the menu.
    • There is will show the available partitions and external storage devices if any
    • Right Click on the disc partition you want to shrink and select "shrink volume" (/here i suggest you to select D or E drive to shrink).
    •  Windows 8 will assess how much space can be made free
    • It will suggest the value which can be made free. Be sure that this is at least 10-15 GB. If you dont have this space, you will have to delete some data to make space for the partition.
    • Then select "shrink"
    • Vista will shrink the volume and show the new freed space as "unallocated" space.
    • After this close the window. You are done with shrinking .
     
  • The next step is to install Ubuntu.
    • You will need to download the latest ISO for Ubuntu  from here:
    • http://www.ubuntu.com/download/desktop 
    • You will need to burn this ISO image on to a CD.
    • For burning this ISO you will have to use an ISO burning software. One such free software is: Free ISO burner: http://www.freeisoburner.com/ 
    • Be sure to burn the ISO image at a very slow speed. This extra time spent will help you install Linux trouble-free.
    • When the disc is ready, restart the computer. Be sure that in BIOS setup the CD drive is above the hard disc in boot priority.
    • Once restarted the disc will boot before the hard disc.
    • In the menu that is displayed, select "run installer" and follow the instructions.
    • Once you have selected language, Location and Keyboard configuration....the disk partitioner of ubuntu will run and show you various options as to where Ubuntu should be installed.
    • Select "Largest continuous free space" as this will select the "unallocated space" that we have created in the earlier step by shrink tool.
    • After this follow the next instructions to complete the installation.
    • Complete the installation. It will prompt to restart the computer. Do so.
    •  After restart, the menu will show Ubuntu and Windows 8 a dual boot OS and now you are free to choose the OS you want to load.

     

Cygwin complete Commands on Windows

Cygwin on Windows

Commands in Course Order:

Command
Usage
Comment
pwd
pwd
Print your current directory (folder) location
ls
ls
List the files in the current folder
mkdir
mkdir  Blast
Make a new folder.  Example Blast
cd
cd  /Blast
Change to another folder like Blast
cd
cd  c:/
Change to C drive
cd
cd   /
Change to the root directory.  Cygwin files are here
man
man  pwd
Show the manual pages for all command
cat  >
cat  >  file1
Create file1 and write data to it
cat  >>
cat  >>  file1
Add new lines to the bottom of file1
cat
cat  file1
Show/display contents of file1 to the screen
cat
cat  file1  file2
Show/display contents of file1 and file2 to the screen
sort
sort  file1
Sort the contents of file1
sort
sort  file1  file2
Sort the contents of file1 and file2 together
alias
alias  dog = “cat”
Assign the work dog to the cat command
alias
alias  path = “/BioDownload/bin/”
Type path instead of /BioDownload/bin/
|
cat  file1  file2  |  sort
Called Pipe.  Places output of cat into sort
head
head  TA496Seq1
View the first few lines of a file, especially a large file
tail
tail  TA496Seq1
View the first few lines of a file, especially a large file
less
less   TA496Seq1
View a large file and control the output
cp
cp  file1  file2_copy
Make a copy of file1 and call it file2_copy
cp
cp  file1  /Bioinfo
Make a copy of file1 and place it in the folder Bioinfo
cp
cp  file1  /Bioinfo/cp_test
Copy file1 into the folder Bioinfo and call it cp_test
mv
mv  file1  /Bioinfo
Move file1 into the folder Bioinfo
rm
rm  file1
Permanently delete file1
rm
rm  /Bioinfo/file2
Delete file2 which is located in the Bioinfo folder
rmdir
rmdir  /Bioinfo
Remove the folder called Bioinfo
grep
grep  “ATG”  file1 
Search for ATG in file1
grep
grep  “ATG”  file1  file2
Search for ATG in file1 and file2
grep
grep  -i  “ATG”  file1
Search for ATG in file1 regardless of case:  Atg, atg, ATg, and so on
grep
grep  -ic  “ATG”  file1
Search but return only a count of occurrences of all ATG
grep
An excellent reference
www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/

Commands in Alphabetical Order
Command
Usage
Comment
|
cat  file1  file2  |  sort
Called Pipe.  Places output of cat into sort
alias
alias  dog = “cat”
Assign the work dog to the cat command
alias
1alias  pathx = “/BioDownload/bin/”
Type pathx instead of /BioDownload/bin/
cat
cat  file1
Show/display contents of file1 to the screen
cat
cat  file1  file2
Show/display contents of file1 and file2 to the screen
cat  >
cat  >  file1
Create file1 and write data to it
cat  >>
cat  >>  file1
Add new lines to the bottom of file1
cd
cd  /Blast
Change to another folder like Blast
cd
cd  c:/
Change to C drive
cd
cd   /
Change to the root directory.  Cygwin files are here
cp
cp  file1  file2_copy
Make a copy of file1 and call it file2_copy
cp
cp  file1  /Bioinfo
Make a copy of file1 and place it in the folder Bioinfo
cp
cp  file1  /Bioinfo/cp_test
Copy file1 into the folder Bioinfo and call it cp_test
grep
grep  “ATG”  file1 
Search for ATG in file1
grep
grep  “ATG”  file1  file2
Search for ATG in file1 and file2
grep
grep  -i  “ATG”  file1
Search for ATG in file1 regardless of case:  Atg, atg, ATg, and so on
grep
grep  -ic  “ATG”  file1
Search but return only a count of occurrences of all ATG
grep
An excellent reference
www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/
head
head  TA496Seq1
View the first few lines of a file, especially a large file
less
less   TA496Seq1
View a large file and control the output
ls
ls
List the files in the current folder
man
man  pwd
Show the manual pages for all command
mkdir
mkdir  Blast
Make a new folder.  Example Blast
mv
mv  file1  /Bioinfo
Move file1 into the folder Bioinfo
pwd
pwd
Print your current directory (folder) location
rm
rm  file1
Permanently delete file1
rm
rm  /Bioinfo/file2
Delete file2 which is located in the Bioinfo folder
rmdir
rmdir  /Bioinfo
Remove the folder called Bioinfo
sort
sort  file1
Sort the contents of file1
sort
sort  file1  file2
Sort the contents of file1 and file2 together
tail
tail  TA496Seq1
View the first few lines of a file, especially a large file


1Note:  there are certain words that are reserved as “commands”.  For example we could not use “path” as an alias, but we could use “pathx”.

Basic Cygwin commands

Here are some basic Unix commands for navigating and exploring data:

Listing files and folders, type:


ls           - Lists the files and folders in the current directory
ls -lt      - Lists more information about all the files/folders in the current                              directory, one file/folder per line

Pattern matching

Example: 

1) ls time*? will list every file that starts with the word time while the command
ls time*.dat will match everything in the folder that begins with time and ends with .dat .

2) Tab            - The Tab button will complete the name of a file or folder if it is unique.  For example, if there is only one file that begins with untitled-2 then simply typing ls untitled-2 (Tab) will complete the file without having to type the rest of the letters. This saves a lot of time when most of the files are unique. 

3) Ctrl d         - This is typed if you have finished typing part of a filename and you need to find out which files have that same beginning part in their names.  For example, typing ls -untitled-2 (Ctrl d) will display all the files that have that beginning of the filename untitled-2.  After typing this, you can see what the exact name of the file you wish is named and type in the rest of the name.  When you combine Ctrl d with the Tab button, you typically only need to type a few letter per name, even if it is long.  This saves a considerable amount of time. 

4) Up arrow    - Typing the up arrow on the command line will show you the last command that was executed.  You can just modify this one or run it again to see the results of the same or new file. 

Changing folders/manipulation of folders


cd folder-name             - folder-name is the name of the folder you want to move to
pwd                                      - Displays what folder you are currently in
mkdir                                    - Creates a folder (directory)
rmdir                                    - Removes a folder (directory) but it must be empty
Changing/moving file/filenames
cp old-filename new-filename        - Copies the old file to the new filename without erasing the old file
mv old-filename new-filename        - Changes the old file to the new filename and erases the old file
rm filename                                    - Removes the filename you type

Printing a file

Cygwin users:  You can open regular text files in MS Word and save and print them normally. 

Viewing contents of a file

vi filename                     - vi is a visual program to view the text in a file such as the results from a program. 
head filename                - Shows the first 10 lines of a file
tail filename                - Shows the last 10 lines of a file. 

Executing/Stopping programs

To execute a program, you only need to type its name.  You may need to type ./ before the name, if your system does not check for executables in that file.
Ctrl c                     - This command will cancel a program that is running or wont automatically quite.  It will return you to the command line so you can run something else. 
vi program
Once you type the command above, the window will display the text.  Unlike a regular document program, vi does not let you just type using the keyboard.  Instead, each key has a function, such as move the cursor left or down.  Here are the basic commands you can use to edit and save the commands.  You can use the arrow keys just like normal, and must be used to move the cursor to the place you want to start typing/editing.  The mouse will not work in the standard vi program, only the keyboard is used.  This takes some getting used to. 
i                      - insert is similar to a but is to the left of where the cursor is.

a                      - appends to the data, after typing a you can use the keyboard to type in letter/numbers like a normal word processing program.  When you are done typing what you want at that location, you need to hit the Esc button before you can return to the regular mode. 

Esc                 - escape ends the current mode you are in (i.e. typing mode) and takes you back to the original.

x                      - Typing x lowercase will erase the character on the cursor, like the Backspace key does in a normal word processing program.  The Delete button will do the same thing in the regular mode.

:w                   - saves all the changes you made to a existing file name.

:w new-filename           - saves all the changes you made to a new filename you specify.

ZZ                   - Capital ZZ.  This will save and quit the vi program and bring you back to the command line.

:q!                 - This will quite the vi program without saving the last changes you made.

u                      - This is undo, and will undo the last action you have completed.

dd                   - This will erase the entire line.  Tying a number before typing dd will remove the number of lines chosen.

:se nu         - This is to set number lines which will temporarily number the lines of the document for you.

Ctrl f         - This will page down the document by one screen length.

Ctrl b         - This will page up the document by one screen length.

G                      - This will move the cursor to the end (bottom) of the document

1G                   - This will move the cursor to the top of the document