Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Saturday, February 5, 2011

10 Beginner Mistakes to be avoided by Linux newbies

Ever increasingly, Linux is becoming more and more popular. Along the way, there are several common mistakes that users new to Linux tend to make. In fact, from time to time, you can even find some seasoned Linux users making some of these same mistakes. If you can avoid these mistakes, the transition to Linux will be a lot easier.


1. Installing from outside the official repositories:

This mistake is generally done by those who have used mostly Windows before. They try to programs and software from outside the official repositories just as  in Windows. Almost all Linux distributions have official repositories and the software packages need to be installed from them. For example, in Ubuntu, install the software from the Ubuntu Software Center. This Center contains a list of all the softwares available officially. If you have installed the software outside the official repositories, there is a little chance to get assistance.


2. Doing selective updates:

This undoubtedly will make your system unstable mostly by broken links. It's considered a good practice to install all the updates periodically. To install all the updates, goto System > Administration > Update Manager. Not only this, but delaying these updates would be costly for you. So, it is always suggested to do complete update periodically.


3. Linux is not Windows:

There may be a lot of similarities in between Linux and Windows. But, don't expect Linux to be exactly like Windows. The similarities help in making an easy transition towards Linux.


4. Avoid learning command line:

The computer world has been changing continuously in the field of user interfaces. Its getting easier and easier for the users to use many operating systems and applications now-a-days. But, the whole process started with the command line user interface. And Linux is an operating system which expects you to learn a bit of command-list. Command line way of doing things is a lot quicker than the GUI. Besides all this, some things can be done only through the command line. So, if you have decided to work with Linux, then learn commands.


5. Misusing the help forums:

Even though Linux is free, help for getting started is close at hand, and available from multiple sources. There are help files, user manuals, and even the "man pages" that are easily accessed through either the command line or the other graphical way. For each Linux distribution, there is a separate user forum for getting help regarding all the operating system issues. By searching, you are likely to learn other important things. So, get the most of these user help forums.


6. Avoid running as root (when needed):

Running the operating system with root privileges will surely inflict some damage to your system. So, avoid running as root as far as possible.


7. Avoid relying too much on WINE:

WINE is a utility to run Windows executable programs on Linux. Find Linux software counterparts and try using that instead of installing all the softwares through WINE.


8. Ignoring the system messages and errors.



9. Its not Ctrl-Alt-Delete:

In Windows, this shortcut gives you the Task Manager. However, Linux restarts when these buttons are toggled. There is an applet named "Force quit" which can be used for force quitting unresponsive programs.


10. Giving up too early:

This happens mostly as far as Linux is concerned. Everyone must realise that they are not born knowing Windows. So, put some efforts to learn Linux and you will get rich dividends.

Sources: PC Linux OS Magazine

Wednesday, February 2, 2011

Linux -- User Communication -- Part-3 -- news command

The system administrator is the sole person who can make news under the Linux. He types the information which he wants everyone on the network to know of in different files in /var/lib/sysnews directory. 

Whenever we log in if any fresh news has come in since we logged out last time then a message is displayed on our terminal saying, news: appeal rally where appeal and rally are the names of files in which the news items are available. We may either choose to ignore it, or if any news item interests us we may decide to pursue the same.
  • First, we can look at the names of the news articles by the command news with -n option. Similarly, to know the number of unread news articles that are present in the /var/lib/sysnews directory, we use the command news with -s option. If you try news -s after you have gone through all the news items it promtly displays the message "NEWS: 0 news articles".




  • The command without any options would yield the list of unread news articles one after another.


  • At the same time, the user can pursue only a particular news article  from several items by specifying the article name after the command. For example, if you want to pursue the article named appeal, then you can run the command at the prompt as news appeal


  • If the user decided to pursue all the news articles (read and unread), then the option -a has to be used with the command.

Linux -- User Communication -- Part-2 -- wall command

The write command is used for communication between two users connected to a network. However, if a user wants to send a message to everyone in the network; then the wall command will be used. The command is mostly used by the administrators for purposes such as the situation where the Unix/Linux system will be shut down in 10 minutes. He does so using wall. After giving the entire message, Ctrl - D must be pressed. The default behaviour of wall command is as shown in the below figure:



Another important thing to note about this command is that it writes to all the terminals irrespective of whether the users have given write permission to their terminals or not, as important messages are often posted using the wall.

Thus, this command is used to broadcast a message to everyone on the network and the necessary message is written onto the terminals of all the users.

A variation of wall would be to broadcast the contents in a file to all the terminals. This is done by the command given as: "wall < [file-name]". In this case, Ctrl-D need not be pressed. This is shown in the below figure:



To know about the next part of the Linux user communication, click here.

Tuesday, February 1, 2011

Linux -- User Communication -- Part-1 -- write command

The communication between/among different users in Linux systems connected in a network is actually just as simple as running some commands. A direct application of a network system, communication is handled expertly by Unix. The commands used for such a communication are as follows:
  1. write
  2. wall
  3. news
  4. mail
The "write" command:
The write command can be used by any user to write something on someone else's terminal, provided the recipient of the message permits communication. There are two pre-requisites for a smooth write operation:
  • The recipient must be logged in, else an error message is inevitable.
  • The recipient must have given permission for messages to reach his or her terminal.
If you do not want the messages to be posted on your terminal, just type the command: mesg n. But, by default the terminal allows messages to be posted on it. To know if the messages can be posted on your terminal or not, just type the command mesg. If the command returns "is y", then messages can be posted on your terminal, otherwise they cannot be posted. Before using the write command, it is a good idea to first ascertain who all are logged in and who allow messages to their terminals.

finger is one command that tells you which users are connected and which, if any can receive messages. It displays a list of all those who have logged in and places a * next to those terminals where mesg is set to n.


Another command that may be used for this purpose is who -T. The command who lists all the users who are currently logged in. When used with -T option, it places a '+' next to users who have allowed messages and a '-' sign beside others.



Now, the default behaviour of write command is as shown below. The first screen-shot is the terminal on the sender side and the second on the receiver side.





Variations of write:
  • Writing to somebody who has set mesg to n on his terminal. The permission gets denied on such occasions. However, if the sender has mesg set to n and the receiver has mesg set to y then the reply to the message is not possible.


    • A user logged in at more than one terminal and you want to send a message only to one terminal. The terminal specified in the command will be sent a message simply. If we do not mention the terminal to which the message should be sent, then the write command comes up with a smart solution in case of confusion. In all the above screen-shots the user is logged in at more than one place. For example, write user tty9 writes to the terminal tty9 of user-name user.
    To know about the next part in Linux user communication to know the wall command, click here.

      Monday, January 31, 2011

      Linux -- Directory Stack

      I am just surprised at the way Data Structures are used in our day-today life not just the computers field. Now, its time to discuss the directory stack. The basic idea of stack is also applied to the directory stack, a list of recently-visited directories. Like any other stack, the directory stack also allows us to view the contents of stack, push an element into the stack, pop an element from the stack. But the difference is that the insertion and deletion operations can be done on any element in the stack, not just the top element of the stack.

      Push operation is carried upon by the pushd command while Pop operation is carried upon by the popd command. These two operations can quickly navigate around the file-system. If the pop operation is issued when the stack is empty, the appropriate message is issued. The cd command changes the current element at the top of the stack i.e., the $DIRSTACK variable. The dirs builtin displays the contents of the directory stack. The contents of the directory stack are also visible as the value of the DIRSTACK shell variable.

      In short, the pushd builtin adds directories to the stack as it changes the current directory, and the popd builtin removes specified directories from the stack and changes the current directory to the directory removed.

      The pushd command is similar to the cd command, but pushd retains the directory that you are currently in, in its directory-stack. For example, the command pushd /usr/share displays the entire directory-stack. It knows that I came to /usr/share from the home directory. If I issue popd, this is going to take my directory-stack and bring me back to the previous directory in the directory-stack. The command saves the current directory on the top of the directory stack and then cd to dir. With no arguments, pushd exchanges the top two directories.

      The popd command removes the top entry from the directory stack, and cd to the new top directory. When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory.

      The basic behavior of pushd, popd and dirs are shown in the figure below:



      The DIRSTACK array needs some explanation at this point in time. The contents of the array can be displayed by the command "echo ${DIRSTACK[*]}". If only the second element in the array needs to be printed, then "echo ${DIRSTACK[1]}" as the arrays start with index as 0. The DIRSTACK array is shown in the below figure:




      Variations of dirs:
      dirs [+N | -N] [-clvp]
      +N: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero.
      -N: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero.
      -c: Clears the directory stack by deleting all of the elements.
      -l:  Produces a longer listing; the default listing format uses a tilde to denote the home directory.
      -p: Causes dirs to print the directory stack with one entry per line.
      -v: Causes dirs to print the directory stack with one entry per line, prefixing each entry with its index in the stack.

      The variations of the dirs command are shown in the below figure:


      Variations of pushd:
      pushd [dir | +N | -N]
      +N: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
      -N: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack.
      dir: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir'.

      Variations of popd:
      popd [+N | -N] [-n]
      +N: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero.
      -N: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero.
      -n: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated.

      The variations of pushd and popd are shown in the figure below:




      Sources: Bash Reference

      Sunday, January 30, 2011

      Linux terminal - Mathematics

      Important mathematical calculations can be done by using the Calculator application available with the Linux applications. But these calculations and can be made by the following commands in the terminal:
      1. bc
      2. expr
      3. factor
      4. units
      1. The "bc" command:
      The programmable calculator called bc gets you into the calculator mode, and the $ prompt disappears. The command gives almost all the basic mathematics calculations. The input  to this calculator is taken line by line. Enter an expression and the result supplied in the next line. The inputs and results are self-explanatory. Typing "quit" gets you out of the calculator mode and ends your tryst with bc. The basic mathematical calculations can done using bc command as follows:


      One of the useful features of bc is that of a base conversion. The variables ibase and obase are set such that ibase gives the base of the input and obase gives the radix or base of the output number. As shown in the figure below, the number is given in base 10 and the input is converted into base 2.


      In addition, bc also supports functions like sqrt, cosine, sine, tangent etc., The trigonometric functions sine and cosine ( s() and c() respectively)would work only when the bc command is used with the -l option. The trigonometric functions expect their arguments in radians not in degrees.



      A for loop can also be run in the calculator mode as shown below.


      2. The "expr" command:
      In addition to bc, the expr command is used for evaluating basic mathematical calculations dealing with only integers. The expr command cannot perform calculations on data other than integers. The operators must be surrounded on both sides by a space. When using * operator, use the backslash ( \ ) for the purpose of escape-sequencing since * operator is a meta-character.



      3. The "factor" command:
      The factor command takes as input an integer and gives the output all the prime factors of the input; each one is printed the proper number of times. To end it, press Ctrl - D. The command factor when used with the argument as the input, it returns all the prime factors of that number.


      4. The "units" command:
      The units command is another handy utility, which converts quantities expressed in various standard scales to their equivalents in other scales. It works interactively in this fashion:


      Thursday, August 19, 2010

      Switching between the X Window mode and the Command-line mode

      Not many would like to work with the command-line in Linux (Ubuntu), but there may be a few geeks who want to try the command-line to really learn the commands. The third type of users want to use both the X-Window mode and the Command-line mode. The present post is specially targeted to such a kind of users.

      To go to the command-line mode from the X window system, press the keys Ctrl+Alt+(F1-F6). Any one of the Function keys in between F1 and F6 is alright. Now for suppose, you want to switch to the graphical mode (X Window system) for some purpose, you can do with an easy shortcut Ctrl+Alt+F7.
         Switching from X window mode to command-line mode -- Ctrl+Alt+(F1-F6).
         Switching from command-line mode to X window mode -- Ctrl+Alt+F7.

      Wednesday, June 23, 2010

      What's new in Ubuntu 10.04

      I found these very much interesting in Ubuntu 10.04 over the previous versions.

      1. Security:
                          The security levels in Ubuntu 10.04 have been increased. Firstly, a "root" account cannot be created under any circumstances, thus forcing us to use only the normal account. However, we can make installations using that. But a direct "root" account is not available.
                       
      2. Messaging:
                    I think this field has got a wide improvement over the previous versions. It makes audio and video calling very easy. In addition to this, Social Gibber client is also installed by default, to view microblogs such as twitter and other social networking sites.

      3. Networking:
                           I found networking has improved over Ubuntu 9.10. This previous version only had connection through Internet by command line. There are bugs in Network Manager in Ubuntu 9.10 especially when connecting by DSL. But these bugs are rectified in Ubuntu 10.04.

      4. Startup:
                      Startup time has decreased and the operating system loads within no time. Quick startup definitely gives it an extra edge over the previous versions. Other softwares also seemed to start in quick time.

      5. Games:
                         The games have also been changed. There are more logical games than the other conventional card and arcade games.

      6. Other improvements:
      • Open Office 3.2 is used in this operating system. It starts very quickly and has many additional options over the previous versions.
      • Graphics drivers are installed automatically along with the operating system.
      • The new sound recorder is working well. There were some bugs in Ubuntu 8.10.
      • "Add or Remove programs" has been changed to "Ubuntu Software Center", leading to better categorization. The default programs can also be removed from the system, while this was not possible in Ubuntu 8.10.

      Tuesday, November 17, 2009

      Login as root in Linux

      • Open Applications>Accessories>Terminal.
      • Type: sudo -s.
      • It asks for a password and you have give password of your account. Here, -s means super user account, run the login scripts.
       
      • When you want to logout then type exit and you are done with logout of the root.
      • For setting the password for the login of root, open: System>Administration>Users and Groups.
      • Unlock root with your current password and set the password manually.
        Now open System>Administration>Login Window. Open Security tab and check the Allow local administrator login option. Now logout and you can again login as a root

      Saturday, November 14, 2009

      Login Window -- Linux

      Don't you get bored with the same login theme and the same login sound? If you are, then you can change the settings and then enjoy with a new theme all over.
      In order to change anything with regards to the login, you have to open
      System>Administration>Login Window.
      First let's talk about the login window theme. To change a login window theme, you have to open the "Login Window" and go to the "Local" tab as shown in the below figure. 
      You can change the default welcome message. By default, it will be "Welcome" on the screen.


       Style: You have four options here.
      1. Plain
      2. Plain with face browser
      3. Themed
      4. Themed with face browser
      Plain:
      You can either select a background color or a background image for your login screen. You can also select a logo which appears at the top of the actual login window. So, if you have a very cool wallpaper, then this gets very near to the themed style.
      Given below is a figure that gives you an outlook of the first case of selecting a background color.


      The second possibility of going for a background image is shown in the below figure.

      As can be seen from the figures above, you can also specify the position of the window. You are also given the lock window option through which you cannot move the login window. Precisely, you have a lot of flexibility in selecting this style.

      Plain with face browser:
      This style is similar to the plain style.

      Themed:
      You will be provided a set of themes. If you want to add some more themes then drag and drop the theme into the tab. You can remove the unwanted themes as well.

      You can now select the theme at the time of login. If you are interested in more than one theme, then select the "Random from selected" option and select the themes. Each time, you will get a randomized theme out of your choices.


      Themed with face browser:
      This style is similar to the themed style.


      Sound Settings:

      This is all about the look and feel in the login screen. Now lets get into the sound settings at the time of login.
      Go to System>Administration>Login Window.


      Open the "Accessibility" tab. Select the .wav or .ogg audio file for "Login Screen Ready". But to change the login sound preferences, you need to go to System>Preferences>Sound. Open the "Sounds" tab.


      Change the login sound here. Then uncheck the "Login Success" and "Login Failed" in the Login Window. Enjoy with this new piece of sound at startup.

      Tuesday, October 20, 2009

      Easy virus removal from Pen Drives with a dual boot system

      Most of us using Windows are often troubled by viruses. One important thing to note is that the viruses designed differ from one operating system to the other. So, this indeed gives a very good idea to easily remove viruses without being troubled much. Especially, when you are using pen drives there is a huge threat of virus installation into the windows mainly (more prone to viruses). So, if you can identify virus in the pen drive, then it is better to first open it in the second operating system preferrably and perform manual deletion of those viruses.

      In this special case, I have the host operating system to be Windows XP with Ubuntu Linux as the guest operating system. I had the autorun and recycler viruses, which I identified early enough so that no damage is done in Windows. So, I opened the contents of the pen drive and deleted all the viruses without any problem and they were quite easily removed from the pen drive. Also, as viruses differ from one operating system to another, we dont have any sort of threat in the Linux (guest operating system).

      Thursday, October 15, 2009

      Mozilla Firefox Sucks

      One of the most powerful web browser in Linux, Mozilla Firefox has a very high CPU Utilisation. Its CPU Utilisation at times reaches a maximum of 98% at high load conditions in the web browser.
      One such instance is as shown below:



      Here, as the screenlet meter shows, 96% of CPU is being used.


      The Ubuntu8.10-Linux tells us that 256 MB RAM is enough for running it, but if Mozilla Firefox is in use, then the computer will become really really slow. Switching between processes takes a lot of time in systems with 256MB RAM.

      I would prefer going to Opera rather than using Mozilla Firefox. Opera provides the best tab facility and operates faster than Firefox. There are also other light weight web browsers but they have their own disadvantages and also don't have the features provided by the above two browsers.

      Relatively, I observed that Mozilla Firefox in Windows operating system delivers better performance than in Linux.

      Avant Window Navigator

      Avant Window Navigator is a king of an extra element in order to give Linux a better look and feel.
      To get it started automatically after being switched ON you have to follow the given procedure:
      1. Go to System>Preferences>Sessions.
      2. Add a startup program by clicking on Add.
      3. Name: AWN Manager, Command: avant-window-navigator
      Now coming to the usage of the Avant Window navigator,

      1. Go to Applications>Accessories>Avant Window navigator
      2. The manager for AWN will be opened something like this:
      3. As you can see, you can try different variations of appearances of this AWN.
      4. You can also add, delete, install and change the order of the applets in AWN. The activated applets can only be present on the AWN Bar. To add an extra applet to AWN from an icon in the Desktop, we just need to drag and drop on the bar and you are done. These applets are available for free download on the internet. So, no need to panic.
      5. Similarly, you can add more new themes into this manager to enable great look and feel.
      Related Posts Plugin for WordPress, Blogger...