title: Why can't I use 'sudo su' within a shell script? How to make a shell script run with sudo automatically
body: <p>I cannot figure out what's wrong with this. When I run it in terminal and enter password, nothing happens, but if I run every command separately in terminal, it works. Thank you! </p>
  
  <pre><code>#!/bin/bash    
  
  sudo su;
  mkdir /opt/D3GO/;
  cp `pwd`/D3GO /opt/D3GO/;
  cp `pwd`/D3GO.png /opt/D3GO/;
  cp `pwd`/D3GO.desktop /usr/share/applications/;
  chmod +x /opt/D3GO/D3GO
  </code></pre>