Skip to main content

useful ubuntu/debian commands for sys-Admin

  • To clean the cache from system which apt caches when we update/install the packages
apt-get clean 
    •   To downloads  packages list from repository and update them,to get data on latest available packages
    apt-get update 
      •  To install specific version of  package
      apt-get install package-name 
      • To check OS version   
      Ex : lsb_release -a
        • To provides the package's description, its dependencies, the name of its maintainer. apt search, apt show, aptitude search, aptitude show work in the similar manner
        Ex : apt-cache search php5-fpm
          • The checkrestart program tries to determine if there are  processes  in the  system  that  need to be restarted after a system upgrade .Consequently, checkrestart is sometimes used as an audit tool  to  find outdated  versions  of  libraries  in  use, particularly after security upgrades

          Ex : checkrestart -h
            •  List all installed packages, along with package version and short details.
            Ex : dpkg -l php5-fpm
            • To check OS version 
            Ex : lsb_release -a
              • To check memcache version on debian
              Ex : telnet localhost 11211;and type 'version'

                • To check openssl version on debian
                Ex : openssl version -a OR dpkg-query -l | grep openssl

                  • To know the date on which current version of OpenSSL was built
                  Ex : openssl version -a OR dpkg-query -l | grep openssl

                    • To check auto update is enable
                    Ex : apt-get install unattended-upgrades and look into the files /etc/apt/apt.conf.d/10periodic /etc/apt/apt.conf.d/20auto-upgrades
                    • To check available packages in Debian/ubuntu
                    Ex : apt-cache policy openssl
                      • To check Loaded configuration files in Ubuntu
                      Ex : php --ini OR php -i | grep 'php.ini'
                        • To get glibc version
                        Ex : ldd --version
                          • To start a daemon at startup
                          Ex : update-rc.d service_name defaults
                            • To remove a daemon at startup
                            Ex : aupdate-rc.d -f service_name remove
                              • To check apache using which module perfork or worker 
                              Ex : apache2ctl -l OR apache2ctl -M
                                • To add CD-rom as repository
                                Ex : openssl version -a OR dpkg-query -l | grep openssl

                                  Comments

                                  Popular posts from this blog

                                  Multiple instances of redis

                                  In the last post I have covered how to install redis server on Centos/Rhel using rpm method and yum method and some troubleshooting skills. In this post i am going to cover how to install and configure redis to run with multiple ports.                                                                           But why we need more ports ? If you have read my earlier post , you already know that by default redis runs on single port 6379, which any one can use it for small website to cache the data. But for heavy website like magento we need to use additional ports along with 6379 to serve different cache from different ports. Like in Magento there is simple cache which is normally stored under /var/cache directory. Then there is Full Page Cache which is stored under /var/full_page_cache...

                                  Solution and Step to fix CVE-2019-5736 Vulnerability - Docker

                                  Recently a new vulnerability has been discovered in the the internet market having target to Docker services. What is this Vulnerability: In short, Docker service uses another service called as runc which is container run time to spawn and run containers. which simply means if docker task is to create docker images then runc task would be running them and attaching a process to container. So as per the recent discovery by the maintainers of runc, the code of this service was having some bug which can be used by attackers to gain the root level of access of the host machine on which docker containers are running. How it can be Exploited: This vulnerability can be exploited in two ways (1) if the docker images are in use is vulnerable making the containers build from it vulnerable also (2) if somehow attacker got the access of containers and then trying to exploit using the bug present in runc and trying to get root privileges. Solution to Fix Vulnerability: Ce...

                                  arbtd: Package isn't signed with proper key

                                    If you are System Admin and worked on linux machine or servers in your current job or in past. Chances are you might come across linux service abrtd, even if you have not worked on it. but might be through some other work. same thing happened to me, while I was doing my regular work of installing php packages on linux  servers , i came across this error for which spent couple of hours actually to resolve it. T he error was