Skip to content

Instantly share code, notes, and snippets.

@JayaByu
Last active September 12, 2023 07:51
Show Gist options
  • Save JayaByu/281f80f8aeab036fe4ec68e67f4c0c55 to your computer and use it in GitHub Desktop.
Save JayaByu/281f80f8aeab036fe4ec68e67f4c0c55 to your computer and use it in GitHub Desktop.

what im doin in this day

create apt with custom proxy

~: sudo vim /etc/apt/apt.conf 

or 

~: sudo vim /etc/apt/apt.conf.d/myproxy.conf

input this

Acquire{
  HTTP::Proxy "http://192.168.20.100:1337";
  HTTPS::Proxy "https://192.168.20.100:1337";
}

or

Acquire::HTTP::Proxy "http://192.168.20.100:1337";
Acquire::HTTPS::Proxy "https://192.168.20.100:1337";

still not try

Acquire::HTTP::Proxy "http://artemis:passw0rd@192.168.20.100:8080";
Acquire::HTTPS::Proxy "https://artemis:passw0rd@192.168.20.100:8080";

Change hostname

~: hostname 
neko

detail about host

~: hostnamectl
  static hostname : neko
        icon name : com-vm
          Chassis : vm
       Machine ID : c35ccd9a7f9a4743
          Boot ID : b50321d91b89f924
   Virtualization : oracle
 Operating System : Ubuntu 23.2.2 LTS
           Krenel : Linux 5.4.0.52-generic
     Architecture : x86_64

in my case im gonna set new hostnam for my vm (No need to rebot)

~: hostnamectl set-hostname Artemis

or

~: hostnamectl set-hostname E-Artemis --pretty

then

~: hostnmectl 
  static hostname : Artemis or E-Artemis
        icon name : com-vm
          Chassis : vm
       Machine ID : c35ccd9a7f9a4743
          Boot ID : b50321d91b89f924
   Virtualization : oracle
 Operating System : Ubuntu 23.2.2 LTS
           Krenel : Linux 5.4.0.52-generic
     Architecture : x86_64

Or you can change with file (Require reboot)

~: sudo vim /etc/hostname

change to

Artemis

then

~: sudo vim /etc/hosts

replace

Artemis

Reload the terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment