1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Discuss in my forum

GNU/Linux Command-Line Tools Summary


   GNU/Linux Command-Line Tools Summary
   Prev        Next

Chapter 8. Finding information about the system

  • time

    If you are looking for how to change the time please refer to date here: Section 8.1 .

    time is a utility to measure the amount of time it takes a program to execute. It also measures CPU usage and displays statistics.

    Use time -v (verbose mode) to display even more detailed statistics about the particular program.

    Example usage:


    time program_name options

  • /proc

    The files under the /proc (process information pseudo file-system) show various information about the system. Consider it a window to the information that the kernel uses.

    For example:


    cat /proc/cpuinfo

    Displays information about the CPU .


    less /proc/modules

    Use the above command to view information about what kernel-modules are loaded on your system.

  • dmesg

    dmesg can be used to print (or control) the " kernel ring buffer". dmesg is generally used to print the contents of your bootup messages displayed by the kernel. This is often useful when debugging problems.

    Simply type:



  • df

    Displays information about the space on mounted file-systems. Use the -h option to have df list the space in a 'human readable' format. ie. if there are 1024 kilobytes left (approximately) then df will say there is 1MB left.

    Command syntax:


    df -options /dev/hdx

    The latter part is optional, you can simply use df with or without options to list space on all file-systems.

  • who

    Displays information on which users are logged into the system including the time they logged in.

    Command syntax:



  • w

    Displays information on who is logged into the system and what they are doing (ie. the processes they are running). It's similar to who but displays slightly different information.

    Command syntax:



  • users

    Very similar to who except it only prints out the user names who are currently logged in. (Doesn't need or take any options).

    Command syntax:



  • last

    Displays records of when various users have logged in or out. This includes information on when the computer was rebooted.

    To execute this simply type:



  • lastlog

    Displays a list of users and what day/time they logged into the system.

    Simply type:



  • whoami

    Tells the user who they are currently logged in as, this is normally the usename they logged in with but can be changed with commands like su). whoami does not need or take any options.

    Simply type:



  • free

    Displays memory statistics (total, free, used, cached, swap). Use the -t

* License

* GNU/Linux Command-Line Tools Summary Index

  1. About.com
  2. Technology
  3. Linux

©2014 About.com. All rights reserved.