Skip to main content

Linux Terminal Command

I will leave here some important basic linux terminal command that might be helpful during program installation and uninstallation process in Ubuntu.


When you want to know the available version of package name then execute following command

apt-cache policy packagename



When you want to install the specific version of package name then execute the following command

apt install packagename=version



When you want to pin the package name not get to update in future then do the following

In the following directory,
/etc/apt/preferences.d/

 Add the following content in the existing file,
package : program name
pin : version x.x.x*
pin-priority : 1000 
Note : pin-priority - This will prevent the program from the up-gradation.



When you want to know the recently installed package name then execute the following command

find /var/lib/dpkg/info/ -name \*.list -mtime -3 | sed 's#.list$##;s#.*/##'

This will show the list package name which has installed in last 3 hours. If you want to know before 3 hours then you can replace the 3 as your wish.

Comments

Popular posts from this blog

Install and Configure Apache in Ubuntu 14.04

Easy way to install and configure "Apache" server in Ubuntu 14.04 1.Install apache:              sudo apt-get install apache2 2. In /etc/apache2/sites-available/000-default.conf :                 ScriptAlias /cgi-bin/ /var/cgi-bin/                <Directory "/var/cgi-bin">                         AllowOverride None                         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch                     ...

Vazhai – Vizhuppuram Visit Experience sharing 3/4/2018 and 4/4/2018

About Vazhai  : Vazhai is an NGO established in 2004 working on mentoring underprivileged kids from Dharmapuri(Bangalore wing of Vazhai) and Vizhupuram(Chennai wing of Vazhai) districts where due to social and political reasons literacy rate is very low. It was formed by Presidency college graduates under the  guidance of experts like  writer Gnani ( https://en.wikipedia.org/wiki/Gnani_Sankaran ). Vazhai does get some financial aid from The Agaram foundation. Vazhai’s main motive is to raise the children to be  a socially responsible person and to groom them so that he/she gets to lead a dignified life in the society . My initital notion about Vazhai was that it is like a typical educational NGO that would focus on academically training the students and to financially support them. But these do NOT feature as a priority in Vazhai’s agenda. Infact they provide very minimal financial aid to the students. Vazhai works like this : ·     ...

Login as NAGIOS user in Terminal

I have written icinga configuration file for some servers to monitoring it. In that, some custom scripts are running with SSH command to monitor the Server status. Everything goes fine till when did shut down the server and launch the same server ( same hostname ) with different hardware due to Memory problem. Note : Memory problem - Sometimes, We need better RAM and Harddisk to handle the traffic when server started to get more request from the Client.  In this moment, the icinga custom scripts and inbuild scripts that related to the server hostname are started to throw the error message that can't connect to server using SSH : SSH Failed ( Same host name. But different hardware ). Because, My monitor server has Old server SSH Key in Known_Hosts for hostname. But, My monitoring server was trying to connect to New Server with Old server SSH Key from Known_Hosts. To avoid this problem, We need to remove Old Server SSH Key belong with Hostname from Known_Hosts...