Skip to content
Thierry Lam edited this page Dec 8, 2022 · 11 revisions
  1. Find and kill a zombie process

     ~$ ps l | grep Z
     ~$ kill -9 <PPID>
    
  2. Upgrade the current linux distribution from the CLI:

     apt-get dist-upgrade
    
  3. Restart GUI from the CLI:

     sudo /etc/init.d/gdm restart
    
  4. Install a .deb file

     sudo dpkg -i rabbitmq-server_2.1.0-1_all.deb
    
  5. VM not on the network http://www.howtogeek.com/wiki/Fixing_%22Failed_to_bring_up_eth0%22_in_Ubuntu_Virtual_Machine Check the available eth# in with @ifconfig -a@ and use that eth# in the networking file.

  6. X session error log:

     /home/tlam/.xsession-errors
    
  7. Private and public key generation https://help.ubuntu.com/community/SSH/OpenSSH/Keys

  8. List installed packages

     dpkg --get-selections</pre>
    
  9. Codecs not part of the official release https://help.ubuntu.com/community/Medibuntu

  10. Reading CBR with Comix if your freshly installed Comix cannot read CBR files.

     sudo apt-get remove unrar
     sudo apt-get remove unrar-free
     sudo apt-get install unrar
    
  11. Completely remove a package and its configuration files

     sudo apt-get purge postgresql
    
  12. ssh with port and alias

    1. In .bash_profile, add alias ubuntu='ssh -p 3022 user@localhost'
    2. Reload .bash_profile with source .bash_profile
    3. ubuntu
  13. scp with port number

     scp -P 3022  file.zip tlam@localhost:/home/user
    
  14. List opened deleted files

     lsof | grep deleted
    
  15. Check amount of free inodes

     df --inodes .
    

VPN

  1. Install openconnect:

     sudo apt-get install network-manager-openconnect
    
  2. In the top taskbar, click on the network icon(arrow up, arrow down): VPN Connection > Configure VPN ...

    1. Select Add
    2. Select VPN, Cisco
    3. Gateway: vpn.yournetwork.com
    4. Label it Your Network
  3. Click on the network icon again, VPN > Your Network

  4. Enter your regular auth

For open vpn, use:

    sudo openvpn --config client2.ovpn

Guest VM

  1. Check if VMware tools is running:

     /etc/init.d/vmware-tools status
    
  2. Run VMware tools:

     /etc/init.d/vmware-tools start
    
  3. Run VMware tools as a service:

     sudo service vmware-tools start
    

Generating CSR

Generate an insecure key with a 2048-bit key length:

openssl genrsa -out server.key 2048

Create a CSR:

openssl req -new -key server.key -out server.csr

References: http://www.geotrust.com/resources/csr/apache2.htm

Setup

  1. Install SSH

     sudo apt-get install openssh-server
    
  2. Upgrade current OS

     sudo apt-get update && sudo apt-get upgrade
    

Email with Exim

  1. Install exim: sudo apt-get install exim4
  2. Configure anytime: sudo dpkg-reconfigure exim4-config

sendmail

  1. Create an email file called test.email:

     Subject: Testing sendmail
     I am testing sendmail locally.
    
  2. From the terminal:

     sendmail someone@somewhere.com < test.email
    
Clone this wiki locally