Installing Ubuntu on VM

Setting up Ubuntu in VirtualBox 7+

  1. Follow the steps here for unattended install.

  2. Setup proxy as shown here:

  sudo touch /etc/apt/apt.conf.d/proxy.conf
  sudo vi /etc/apt/apt.conf.d/proxy.conf
  Acquire::http::Proxy "http://user:password@proxy.server:port/";
  Acquire::http::Proxy "http://user:password@proxy.server:port/";
  Acquire::https::Proxy "http://user:password@proxy.server:port/";
  1. Add user to sudoers file as shown here
 # add user to sudo group
 # Run as root
 usermod -aG sudo <username>

 # To ensure user has sudo privileges, if command returns root, user has sudo privileges
 sudo whoami

 # Otherwise add user to sudoers file
 visudo

 # At the end of file add the following. Replace <username> with the actual username
 <username> ALL=(ALL) NOPASSWD:/bin/mkdir,/bin/rmdir
  1. Run the following:
sudo apt update && sudo apt upgrade -y
  1. For wget setup:

For all users of the system via the /etc/wgetrc or for the user only with the ~/.wgetrc file:

use_proxy=yes
http_proxy=127.0.0.1:8080
https_proxy=127.0.0.1:8080

or via -e options placed after the URL:

wget ... -e use_proxy=yes -e http_proxy=127.0.0.1:8080 ...

Comments

Popular posts from this blog

QTreeView and QTableView dynamic changes

C++ strings and string_view