Friday, 6 March 2015

Menu card for terminal

Now its time to get familiar with terminal:


1. File (Alt+f): We have -
           a.Open Terminal
           b.Open Tab
           c.New Profile:
           d.Close Tab: Closes the tab in terminal
           e.Close Terminal : Closes the terminal window

2. Edit (Alt+e): We have -
          a.Copy
          b.Paste
          c.Select All
          d.Profiles
          e.Keyboard Shortcuts
          f.Profile Preferences

3. View (Alt+v): We have -
         a.Show Member
         b.Full Screen
         c.Zoom In
         d.Zoom Out
         e.Normal Size

4.Search (Alt+s): We have -
         a.Find
         b.Find Next
         c.Find Previous

5.Terminal (Alt+t): We have -
        a.Change Profile
        b.Set Title...
        c.Set Character Encoding
        d.Reset
        e.Reset and Clear
        f.80x24
       g.80x43
       h.132x24
       i. 132x43

6.Help (Alt+h): We have -
       a.Contents
       b.About

Before starting with command,there is name before $ prompt on the black screen. 
What does that mean ?
Format  is: username@hostname:~$ 
Hostname: your system name.
$ indicates as a user prompt

Interesting Part of terminal - Customization :
         The Profile option in terminal helps us keep the appearance of terminal as you want, as u feel comfortable while using terminal.

Let's make a new profile...
 1.  Go in Edit option of Menu

 2.  Go in Profiles

 3.  Press New Button

 4.  Enter New Profile Name and Keep Base on as Default and press Create

 5.  Then you will have many tabs in window like General, Title and Command, Colors, Background, Scrolling etc.

 6.  Switch to Title and Command Tab, In second option of title select Keep initial title option.

 7.  You can keep different background colors, or you can keep background image or keep built-in-schema's . Play with it.. till you get familiar with it and u get to know whats there for customization.

Monday, 19 January 2015

Now its time to play some fun


FUN TIME :


Application installation command is:
       Command: sudo apt-get install <application name>

Application Uninstall with complete configuration  command is:
      Command: sudo apt-get --purge remove <application name>

Application Uninstall command- if you want to re-install application:
      Command: sudo apt-get remove <application name>


Lets start fun with some music:

Rhythmbox Music Player:

  Help command: man rhythmbox
 Run command: rhythmbox [song name with location] or rhythmbox
 
Eclipse Platform:
 Help command: man eclipse
 Run command: eclipse


Nautilus :
Help command: man nautilus
Run command: nautilus [location]
Example: nautilus ~/Music : It will open Music folder in home folder.

Firefox:
Help command: man firefox
Run command: firefox [website name]
Example: firefox www.google.com

Gnome console calculator:
Help command: man gcalccmd
Run command:gcalccmd
Example:> 5+6
Output: 11

Totem Video Player:
Help command: man totem
Run command: totem [video name with location] or totem



 Webcam for Photo :
Help command: man cheese
Run command: cheese


Image Viewer:
Help command: man eog
Run command: eog [image name with location] or eog




Document Viewer:
Help command: man envice
Run command: envice [file name with location] or envice
Example: envice ~/Documents/abcd.pdf



LibreOffice Writer:
Help command: man lowriter
Run command: lowriter

LibreOffice Spreadsheet:
Help command: man localc
Run command: localc



LibreOffice Presentation:
Help command: man loimpress
Run command: loimpress

Alternative to command line for installling software is from:

Software-Center
Help command:man software-center
Run command: software-center



Photo Manager:
Help command: man shotwell
Run command: shotwell

Some Essential Things after getting start with terminal in Ubuntu



Manual:

   Most of the Commands have manuals. These manuals are an interface to the on-line reference manuals.

How to use these manuals ?
 Command format: man [command name]
 Command: man man    ... It sounds crazy yaa....

How to get escape from manuals ?
  Press Small Q to quit manuals.

Details about manuals:

1. Name of Command
2. Synopsis
3. Description
4. Overview
5. Defaults.
6. Options
7.Exit Status
8. Environment
9. Files
10. See Also
11. History
12. Copyright
13.Author

Some details are optional.

The Next Command Similar to Man command..

Information(Info Command):

How to use Info command?

Command: info [command_name]
Command: info ls

How to get quit from information on terminal?
Press 'q'.

What more u have in info command:
 1. Name of command with some meaning of command in short,
 2. Synopsis,
 3. Description,
 4. Options,
 5. Examples,
 6. Reporting bugs,
 7. Copyright information.

Double Tab Trick:

 Use whenever u forget the full command name,or when you want to see the combinations starting from letter or word.

Command: blue and press tab twice.
Output:



These are the name combinations which start from blue.

 How to see Previous typed commands:

 Command: history
 Output: all commands which u entered till last command.

Alternative to that,we can also see previous commands:
  Don't enter any command,just press up arrow key to see previous commands.
Useful: when we have big commands and  rewriting that whole command again take time and which can decrease typing time.

How to see menu options using Launcher ?

   Keep open ur one window and press Alt button.launcher will launch .It will see as..


How to execute command as the superuser ?
Command: sudo [system related command name or to open system related files.]

 Sudo command allows a permitted user to execute a command as a superuser or another user,as specified by security policy.The default security policy is sudoers, which is configured via the file /etc/sudoers.

Now we will use sudo command as below with our new command:

How to shutdown your pc through terminal ?

    Firstly try only-
    Command: shutdown -P 1 "It was awesome experience"
    Now,Type this:
    Command: sudo shutdown -P 1 "It was awesome experience"
    He will ask root password.. so enter your login password.
    Output:
         

To cancel the process running from terminal can be killed by pressing "Ctrl+c".


Wildcards:
  This is one of the crazy part in enjoying the typing and decreasing typing time.
These are useful in many ways for a GNU/Linux Systems and for various other uses. Commands can use wildcards to perform actions on more than one file at a time, or to find part of a phrase in a text file. There are two different major ways  that wildcards are used, they are globbing patterns/standard wildcards that are often used by the shell.
Standard wildcards are used by various command-line utilities to work with multiples files.

To check manual page for wildcards:
 command: man 7 glob

With wildcards also read manual page for regular expressions:
 command: man 7 regex

Example: I want to go to folder Music using wildcards
Command: cd M*
Output:
shrenoid@shrenoid-Inspiron-5520:~$ cd M*
shrenoid@shrenoid-Inspiron-5520:~/Music$

* is a asterik Wild-Card: any combination of character.
M*: word starting with M and having n number of letter in it.

Saturday, 10 January 2015

Lets Start with Terminal

Terminal :
         Terminal is an interface in which you can type and execute text based commands. It can be much faster to complete some tasks using a terminal than with graphical applications and menus. Another benefit is allowing access to many more commands and scripts. Similar to Terminal,we have Command prompt (cmd) in Microsoft Windows.

   Alternative names for the terminal:
  • Console
  • Shell
  • Command Line
  • Command Prompt                               
           I am going to use Terminal on Ubuntu 14.04 Linux Distribution. Go to launcher and type terminal/Terminal ,also you can use terminal shortcut Ctrl+Alt+t  to get to terminal.
       And here we go..



       The best fun in linux is to play  terminal with commands and scripts.

Lets Start with the fun.


Whats today's date ?

      Command: date
      Output :  Mon Jan  5 17:07:43 IST 2015.. this is my time.
      format is : Day Month Date Time Time-Format Year

      IST: Indian Standard Time
      Time is according to 24 hour clock.

Want to see calender ?

     Command: cal
     Output: it will view the going month calender including dates and days.

    To see the other month calender:
         Command format: cal [Month] [Year]
         Command: cal Mar 2015
         Command: cal March 2015
         Command: cal 3 2015

    These 3 variety of command you can enter to get calender of any month.

Who are the users on the system you are sitting ?

     command: who
     output:

          The row after command written is details of system : at what time the system is started ..can be indicated by system name :0 and see next line to it system name pts/0 indicates that the one terminal window is open.

           Try this: Open one more terminal without closing other terminals. Type 'who' and compare the two output on terminals. Again open one more terminal , don't close other terminals ,type who command..see the difference.


       Output format: user_name terminal_name_working_on date time (leave it for time-being)

How to view the process ?
     Command: ps
     Output :
       PID TTY          TIME CMD
     1216 pts/0    00:00:00 bash
     1230 pts/0    00:00:00 ps ...in my terminal

     PID: Process ID
     TTY:  "TeleTYpewriter" which were devices that allowed users to connect to   early computers.

 For the next Command ...

  Now, Lets go to GUI of the Ubuntu.
   Like windows in users folder, In Linux we have 'Home'. In that folder we have all data and named as: Desktop,My Videos,My Music,My Pictures.. similar to windows.
files are organized in separate folders called directories.

Users folder in windows




Home folder in Linux
Now lets return to Terminal ,

How to list  folders and files in My Home?

      Command: ls
      Output: List the names of the files available in the Home directory.

      Output As..
             shrenoid@shrenoid-Inspiron-5520:~$ ls
             bealert of this~   ideapage~                  recordnote2.txt~
             bealert of this~~  jdk1.7.0_67                recordnote.txt~
             car.java~          jdk-7u67-linux-x64.tar.gz  rgb.txt~
             Desktop            Music                      Templates
             Documents          Pictures                   Untitled Document~
             Downloads          Public                     Videos
             examples.desktop   readthis.pdf
             greatlines.txt~    recordnote1.txt~


How to copy the output text to file ?

       Using Symbol '>'
       Command: ls > note1 ...without any space

       output: there is no output displayed on terminal. Cursor returns next to $ sign. Then how to see the contains of the file.
   
    Here's the Next Command.

    Command: cat [file name]
    Type: cat note1 
    Output: U will get all contains of the file note1 on the terminal screen

How to count the Number of lines in a file ?

Command: wc [file name]
Output format: [no of lines] [no of words] [no of characters]

Type: wc note1
Output: something output like

shrenoid@shrenoid-Inspiron-5520:~$ wc list
 15  16 168 list

where 15 is no of lines
           16 is no of words
           168 is no of characters of list file.

How to change directory?
 
Command: cd [directory name/folder name]
If folder name is Documents in home folder.
Command: cd Documents

And you will be in that folder with indication: ~/Documents$
If folder is in present folder or not can be checked using:
  'ls' command or using 'nautilus .' command.

In which location i am working now ?
 Command: pwd
 Output: It gives current working location.
shrenoid@shrenoid-Inspiron-5520:~$ pwd
/home/shrenoid


To go back to previous folder :
 Command: cd .. ..pay attention on space between cd and .. .

Is there much mess on the screen :

We need to clear out the screen? How to do it?

Command: clear
Output: terminal will have clean and fresh screen.

Don't Exit from terminal using -
 Command: exit
 Output: terminal window will be closed.

Monday, 5 January 2015

Introduction to Linux

           Linux is a Unix-like operating system assembled under the model of free and open-source software development distribution.The defining component of Linux kernel , an operating system kernel released by Linus Torvalds.
      
           Linux is packaged in a form known as Linux Distribution.Linux Distributions include the linux kernel, supporting utilities and libraries and usually a large amount of application software to fulfill the distribution's intended use.
            
      Benefits: 1. Decreasing software costs,
                     2. Increasing security,
                     3. Stability
                     4. Protecting privacy
                     5.  Giving users more control over their own hardware.
         
    Power of Linux: 
               1. Millions of servers are having Linux Operating System.
               2. Desktops Operating System
               3. Smartphone Opearting System
               4. Tablets.

         Example of Linux Operating System/Linux Distribution: 
           Ubuntu, Debian, Linux-Mint, Fedora , openSUSE, Arch Linux, Red Hat Enterprise Linux,SUSE Linux Enterprise Server, Android.

        Open -Source Software means a users have freedom to copy, study ,and change the software in any way and can be shared i.e it is freely licensed by name GNU General Public License.

           In contrast to Freely Licensed or Open-Software, We also have Proprietary software ,where the software is under restrictive copyright and the source code is usually hidden from the users.
 
        Desktop Environment is an implementing of the desktop metaphor made of a bundle of programs running on top of a computer operating system, which share a common graphical user interface. A Desktop Environmnet typically consistes of icons,windows,toolbars, folders, wallpapers and desktop widgets.
Desktop Environment aims to be an intuitive way for the user to interact with the computer using concepts which are similar to those used when interacting with the physical world,such as buttons and windows.

       There some Desktop- Environment for unix-like operating system Cinnamon,GNOME Shell, KDE, LXD, Xfce.
       
To Know More About Linux Refer:
       1. www.ubuntu.com
       2. www.distrowatch.com
     



Next Chapter is to Starting with Terminal .You will surely like this page.