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...

                                  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 

                                  Resolving IP SKU Requirements When Adding Azure VMs to Load Balancers

                                  When it comes to configuring Azure Virtual Machines (VMs) within a Load Balancer (LB) environment, there are essential requirements that need to be addressed to ensure optimal performance and reliability. One common challenge faced by Azure users is the necessity of configuring IP SKUs correctly. In this blog post, we'll explore this requirement, its importance, and provide a solution to address it effectively. Understanding the IP SKU Requirement   The IP SKU (Service Key Update) requirement plays a pivotal role in the proper functioning of your Azure infrastructure, particularly within the context of Load Balancers. Here's what you need to know : IP Should Be in Standard SKU When adding Azure VMs to a Load Balancer, it's highly recommended to utilize public IP addresses configured with the Standard SKU. The Standard SKU offers an array of advanced capabilities, including enhanced traffic management and load balancing options. By using Standard SKU, you ensure a higher deg...