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

Monday, August 27, 2012

Obtaining Kernel/OS information through terminal

     It is always a pleasure to have fun messing around with terminal and yet getting fruitful results from the mess. One such thing is obtaining the information regarding Kernel name, OS name, Kernel version, Kernel Release, Machine type, Processor type and so on. All these information is available to the user with the help of uname command. uname is a command line tool with which we can derive various machine and os information. Lets see the commands one by one.

  • To obtain kernel name,
      • uname -s
  •  To obtain OS name,
      • uname -o
  •  To obtain machine type,
      • uname -m
  • To obtain processor type,
      • uname -p
  •  To obtain information on hardware platform,
      • uname -i
  • To obtain the kernel version
      • uname -v
  • To obtain kernel release,
      • uname -r
  • To obtain all,
      • uname -all

      Whenever you need immediate information on your kernel or os these commands come in handy. Don't forget that the terminal is a more powerful tool which is more fast and efficient than the GUI. Go on and mess around more with your system. Because its the only you can get to know your system( "interacting a lot") and don't worry if anything happens because everything can be restored with linux. Hope the information was useful. Looking forward for more.













Find out various hardware/system information using terminal

     Whenever you are in urgent need for system information for example, you would want to know the free memory, your system configuration, hard disk information, a friend may need some immediate details and so on. Always relying on GUI tool can be inefficient because you have to search the tool and view the information. Instead there are tons of commands available out there so that you can view the system information for any particular component or as whole right from the terminal whenever you need. We shall see the commands based on the category listed one by one.

Graphics Information:
  • To know info about your OpenGL, graphics card use the command,
      • glxinfo, 
  • Note: glxinfo may not be installed on your system, install it using
      • sudo apt-get info glx
  • To check if you have 3d rendering,
      • glxinfo | grep direct
      • grep searches for the text direct in glxinfo and returns the information in it.
  • To see the graphics card vendor,
      • glxinfo | grep vendor
  • To see the specifications of the graphics card model,
      • lspci | grep VGA
  • A simple 3d benchmark,
      • glxgears

  •  To see the supported resolutions,
      • xrandr
 Audio Information:
  • To know the information on audio controller,
      • lspci
  • lspci is a command that is used to display detailed information on PCI buses and devices connected to the system.
  •  To know audio device information,
      • aplay --list-devices
 Memory information:
  • To display the amount of RAM and swap space available and how much is being used,
      • cat /proc/meminfo
      • for more information on proc file click here
  •  To display the amount free memory,
      • free -m
      • -m is used to display size in Mb.
      • for more info of free type free --help
  •  To see the processes running in your system (like task manager in microsoft windows),
      • top
      • press C to sort data based on cpu usage.
      • press M to sort data based on memory usage.
HDD information:
  • To display the filesystem information,
      • df -h
      • -h displays data in GB.
  • To display the partition table,
      • sudo fdisk -l
 
 Network Information:
  • To display info on your ethernet controller,
      • lspci | grep Ethernet
  • To display info regarding system IP and other network info,
      • ifconfig
 
 Software Information:
  • To know the current distribution and version,
      • cat /etc/issue
  • To display package version and its dependencies,
      • apt-cache showpkg shutter
      • apt-cache show shutter | grep Version, shows only the version.
 
 USB drives Information:
  • To display the list of usb devices,
      • lsusb
 
 Detailed Information:
  • To list all PCI devices,
      • lspci
 
  •  Overview of all hardware information in short,
      • hwinfo --short
      • To install hwinfor,
        • sudo apt-get install hwinfo
      • For more help hwinfo --help
  
  • CPU uptime can be obtained using,
      •  uptime
 
     You can obtain tons of detailed information regarding your system with the help of these commands. You can get more help on these commands and their uses from the web. Always there will be help when you need it. Hope, the information was helpful.









Saturday, August 25, 2012

How to find which window manager you are using in Linux?

    An XWindow manager(because we are talking about linux) runs on top of the XWindows system. The Window manager can be visualized like a controller that decides how the various windows in a desktop environment undergo transition. Based on the hardware capabilities of the system the graphical transitions of the windows are decided. There are various window managers available like compiz, kde, mutter, metacity, beryl and so on. Each window manager have their own way of managing the window operations.
   You can have more than one window manager in your system without any worries because the kernel of the OS and GUI are separate in linux so this doesn't tamper with you underlying OS kernel. But only one window manager can run at a time. In order to find out what is the default window manager is running in your system unless you have changed it, simple steps are available.

Method 1:
    •  The simple way is to look into the process list to find out the window manager that is running active in the system. To do that,
        •   pgrep -l compiz |cut -d " " -f2
    •  You can replace compiz in the above command with name of other window managers like metacity , mutter etc
Method 2:
    • By using the command wmctrl which is a command line utility for many window managers (linux,windows,etc) and is used to do variety of operations with the windows in the desktop.
    • One of the functions of the wmctrl command is to display information about the current window manager. To achieve this,
        • wmctrl -m
    • But if you get a error like wmctrl not installed, no worries install it the traditional way,
        • sudo apt-get install wmctrl
    • After the installation again type the command wmctrl -m and find the current window manager in your system.

      
     Hope the information was useful and always don't worry when you face any difficulties with any software tool you use because there are always people out there to help.









How to check whether Compiz works fine in Linux ?

     Compiz is a composite window manager which unlike other window manager doesn't stop from normal window transitions effect rather providing visual effects when switching between windows using 3D acceleration and rendering techniques. So, how to find out if the compiz window manger that runs on your system is working good? Thats where Compiz-Check comes in. With this script you can instantly know information regarding the abilities of your system to perform under heavy 3D customization.
     Why to run this test? If you happen to do so much of tweaks with your window manager or config tool you may encounter that your system crashes or programs stop working or any internal error. So, before you do anything it is good to do a test like this.

Step 1:
    • To obtain Compiz-Check type the following command in terminal,
        • wget http://blogage.de/files/70708/download -O compiz-check

Step 2:
    • Next convert the compiz-check script to an executable file using,
        • chmod +x compiz-check
    • Press Enter.
    • Run compiz check using,
        • ./compiz-check
    •  To know more information you can continue with y else n.
      With these simple steps you can know if your system can support the graphic transitions provided by Compiz Window Manger. Hope you find this information useful.




 















How to obtain information about GTK+ on Linux

     GTK+ is a cross-platform widget toolkit with Graphics User Interfaces (GUI) are designed. We come across these terms when you come across an application built based on GTK+ or any other version of GTK+. When you want to change the theme of your desktop,  you will see notes like these themes work for GTK+ 3x or GTK+ 2x etc. How to know what are GTK+ versions your system runs. So, for every problem or puzzle there is solution and this article might help you solve it.

Method 1:
  •  COLUMNS=150 dpkg --list libgtk2.0-0 libgtk-3-0


Method 2:
  •   dpkg --list libgtk2.0-0 libgtk-3-0


Method 3:
  •  apt-cache show libgtk2.0-0 libgtk-3-0 | grep Version


Method 4:
  • For detailed view,
      • apt-cache show libgtk2.0-0

      • apt-cache show libgtk-3-0


Method 5:
  • To know the details of the packages installed,
      • dpkg --get-selections | grep gtk


     So, hope you would be knowing how to find the GTK+ version of your system when you need to install any upcoming versions or to know if your GTK+ version is enough compatible for any software you install.












 

Thursday, August 23, 2012

How to make a bootable Linux USB drive via Unetbootin

    Installation of Linux OS on your system no longer requires any cd's or dvd's. All you need is a USB drive with sufficient storage space and Unetbootin. Unetbootin is an open source software that allows you to make bootable USB drives for Linux installations and it can be achieved with simple steps.

Step 1: Obtain Unetbootin
    •  To get Unetbootin on your system type the following command from your terminal,
        • sudo apt-get install unetbootin
    • Press Enter and wait for the installation to complete. 
 Step 2: Formatting USB drive
    • After the installation of unetbootin you must format the USB drive before making it bootable.
    • In order to format your USB drive it should be unmounted first. So, to check the USB drive name type,
        • df -h
    • This command displays the list of drives in your system. The USB drive name, for example /dev/sdb1.
    • To unmount it,
        • sudo umount /dev/sdb1
    • After unmounting your USB, formatting can be done using the command,
        • sudo mkfs.vfat /dev/sdb1
    • Now your USB is ready to be made bootable.


Step 3: Creating the bootable USB
    • To launch Unetbootin type the command,
        • nohup unetbootin &
    • After launching Unetbootin you will find two options namely,
        • Distribution
        • Disk Image
    • Selecting Distribution allows you to specify the linux distribution(for example: Ubuntu 11.10) you need and it will be downloaded from the ubuntu website.
    • Alternatively, if you are have an image file of the linux version select Disk Image.
    • After selecting Disk Image, select ISO(by default) and browse the location of the linux image.
    • Next specify the USB drive (for example /dev/sdb1 which depends on your system).
    • Click Ok. Now the process will start and you will be prompted when task is complete.
    • Now, restart your system and select USB from your boot option and follow the on-screen instructions to install linux.
    Now your all set and you can install linux along side any other OS or a standalone one. Hope, this information was useful.

10 top rated developer tools for Ubuntu 12.04 Precise

    When it comes to open source developers will love to mess up with the codes of the software tools they use in order to fix any errors in the tool, provide upgrades and contribute in the development of the tool. Here is the list of the 10 top rated developer tools which developers would like to place their hands on.

  • Code Blocks: 
      Code blocks is a cross-platform IDE which is based on a self developed plugin framework allowing unlimited extensibility. It can installed from terminal using the command,
      • sudo apt-get install codeblocks 

  •  Bluefish  
     Bluefish is a powerful editor targeted towards programmers and web-developers, with many options to write websites, scripts and programming code. Bluefish supports many programming and markup languages. Bluefish is an open source development project, released under the GNU GPL licence.It can installed from terminal using the command, 
      • sudo apt-get install bluefish
   
  • Eclipse
      Eclipse is an open source and extensible platform for development and running of any software development. It can installed from terminal using the command,
      • sudo apt-get install eclipse

  •  Geany
      Geany is a text editor using the GTK2 toolkit with basic features of an IDE. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. It supports many filetypes and nice features. It can installed from terminal using the command, 
      • sudo apt-get install geany

  •  Arduino IDE
     The open-source Arduino environment makes it easy to write code and burn it to the Arduino development board. It runs on Windows, Mac OS X, and Linux. The environment is written in Java and based on other open source software. It can installed from terminal using the command,
      • sudo apt-get install arduino
  •  Qt Creator
     Qt Creator is a cross-platform integrated development environment (IDE) tailored to the needs of Qt developers. It provides C++ and JavaScript code editor, Integrated UI designer, Project and build management tools, Simulator for mobile UI, Support for desktop and mobile targets. It can installed from terminal using the command, 
      • sudo apt-get install qtcreator

  •  Idle
      Idle is a simple ,yet powerful IDE for developing tools using Python. It can installed from terminal using the command,
      • sudo apt-get install idle

  • Spyder
       Spyder which was previously known as Pydee is a powerful and interactive development environment for the Python language with advanced editing, interactive testing, debugging and introspection features. It can installed from terminal using the command, 
      • sudo apt-get install spyder

  • Monodevelop
     MonoDevelop is an open source IDE for the Linux platform primarily targeted for the development of software that uses Microsoft .NET frameworks.  It currently has language support for C#, Java, Boo, Visual Basic.NET, Oxygene, CIL, Python, Vala, C and C++. It can installed from terminal using the command, 
      • sudo apt-get install monodevelop
  

  • Anjuta
     Anjuta DevStudio is a software development studio providing a number of advanced programming facilities which includes project management,  interactive debugger, source editor, version control, GUI designer and so on. It focuses on providing simple user interface, yet powerful for efficient development. It can installed from terminal using the command, 
      • sudo apt-get install anjuta


     These tools will surely be of use to the programmers and developers who have a thirst to explore and exploit more of the softwares they use and will be of their aid whenever needed.