Anonymous

Changes

From Karnataka Open Educational Resources
2,411 bytes added ,  11:28, 25 January 2016
no edit summary
Line 1: Line 1: −
command: top
+
==Offline installation of packages==
purpose:  display Linux tasks.It can display system summary information
+
 
              as  well  as  a list  of  tasks  currently being managed by the
+
When one installs any package to Ubuntu, the *.deb files downloaded will be saved in <code>/var/cache/apt/archives</code> directory. So if the same packages needs to be installed on other machines with same Ubuntu distribution version, the downloaded *.deb files can be used. Please follow below procedure to do that:
              Linux kernel
+
 
 +
# Copy the files from <code>/var/cache/apt/archives</code> directory to any external drive.
 +
# Copy these files from external drive to the Desktop.
 +
# Use below commands to copy files from Desktop to <code>/var/cache/apt/archives</code> directory:
 +
            sudo -s
 +
            cp ~/Desktop/*.deb /var/cache/apt/archives
 +
            sudo apt-get install <code>package_name</code>
 +
 
 +
Note: Unless you have updated repos on the target machine, you may have to run <code>sudo apt-get update</code> which will require Internet.
 +
 
 +
 
 +
 
 +
==List of Commands==
 +
===Top===
 +
purpose:  display Linux tasks.It can display system summary information as  well  as  a list  of  tasks  currently being managed by the Linux kernel
    
syntax: top -hv | -bcHisS -d -n -p
 
syntax: top -hv | -bcHisS -d -n -p
Line 21: Line 35:     
examples:
 
examples:
   
1. $top
 
1. $top
 
     display information like tasks, memory, cpu, and swap press q to quit
 
     display information like tasks, memory, cpu, and swap press q to quit
Line 37: Line 50:  
7. to save top command results
 
7. to save top command results
 
     $top  shift+w
 
     $top  shift+w
 +
 +
 +
===Free===
 +
 +
purpose: Display amount of free and used memory in the system. Displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the
 +
kernel.
 +
 +
Syntax:  free [-b|-k|-m|-g] [-c count] [-l] [-o] [-t] [-s delay] [-V]
 +
 +
 +
Options:
 +
      -b    Display the amount of memory in bytes.
 +
 +
      -c count
 +
              Display the result count times.  Requires the -s option.
 +
 +
      -g    Display the amount of memory in gigabytes.
 +
 +
      -k    Display the amount of memory in kilobytes. This is the default.
 +
 +
      -l    Show detailed low and high memory statistics.
 +
 +
      -m  Display the amount of memory in megabytes.
 +
 +
      -o    Display the output in old format, the only difference being this option will disable the display of the "buffer adjusted" line.
 +
 +
      -s    Continuously display the result delay seconds apart.
 +
 +
      -t    Display a line showing the column totals.
 +
 +
      -V    Display version information.
 +
 +
example:
 +
 +
1. by default free command shows the free and used space of physical and swap memory in kb
 +
    #free
 +
2. switch the free output in bytes/kb/mb/gb
 +
    #free -b
 +
    #free -k
 +
    #free -m
 +
    #free -g
 +
3. To display the totals line at the end, execute free command with -t option
 +
    #free -t
 +
4. Free command displays the output with buffer line normally. we can disable that line in the display by using -o option
 +
    #free -o
 +
5. With -s optoin, we can activate the display of free to show it in every regular intervals for 5 seconds
 +
    #free -s 5
1,823

edits