Ubuntu basic commands

i) Advanced Packaging Tool (apt):

  • apt-get:
    • apt-get update (updates only the list of available packages and their versions, but will not perform any update)
    • apt-get upgrade (this will actually updates already installed packages, must run update before upgrade)
    • apt-get upgrade apache2
    • apt-get dist-upgrade (More thorough dependency resolution)
    • apt-get install | remove apache2
    • apt-get –purge remove apache2 (Removes package and its config files)
    • apt-get autoremove (Remove packages that are not needed anymore)
    • apt-get clean
  • apt-cache:
    • apt-cache search apache2
    • apt-cache search metapackage
    • apt-cache show apache2
    • apt-cache depends apache2
    • apt-cache showpkg apache2
    • apt-cache pkgnames kernel
  • apt-file:
    • apt-file search apache2.conf
    • apt-file list apache2
    • apt-file find /etc/logrotate.conf
  • apt:
    • apt list –installed | grep bash
    • apt show bash
    • apt search bash
  • configs:
    • /etc/apt/sources.list
    • /etc/apt/

ii) Assign static IP Address:

  1. Add the followings into /etc/network/interfaces
    auto ens33
    iface ens33 inet static
  2. Reboot host; OR run the following to avoid reboot:
    1. ip addr flush ens33
    2. systemctl restart networking

iii) Change interface name from ens33 to eth0:

  • Update the following into /etc/default/grub:
    • GRUB_CMDLINE_LINUX=”net.ifnames=0  biosdevname=0″
  • sudo update-grub
  • sudo reboot

About Ishtiaque

I am IBM Certified Infrastructure Systems Architect, Linux Foundation Certified System Administrator, Oracle Certified Programmer in Java and Web Component Developer, and TOGAF 9 certified with over 10 years of support and development experience in IBM middleware software and Java. Additionally, have a sound grip in databases and OpenStack administration. I hold the following certifications: IBM Certified Infrastructure Systems Architect Linux Foundation Certified System Administrator (LFCS) TOGAF 9 Certified Oracle Certified Expert, Java EE6 Web Component Developer Oracle Certified Professional – Java 6 Programmer ITIL v3 Foundation Certified IBM Certified Solution Architect – Cloud Computing Infrastructure V1 IBM Certified System Administrator – WebSphere Portal V8, V7, V6.1, V6 IBM Certified System Administrator – WebSphere Application Server V7, V6.1 IBM Certified System Administrator – AIX V7 IBM Certified System Administrator – WebSphere MQ V7 IBM Certified Deployment Professional – Business Process Manager Advanced V7.5 IBM Certified Solution Advisor – Cloud Computing Architecture V3 IBM Certified Solution Developer – WebSphere Portal V5.1
This entry was posted in Linux, Other and tagged . Bookmark the permalink.