How to Use APT with Proxy on Ubuntu and Debian
/etc/apt/apt.conf.d/proxy.conf
Acquire {
HTTP::proxy "http://proxy_server:port/";
HTTPS::proxy "http://proxy_server:port/";
}
https://linuxiac.com/how-to-use-apt-with-proxy/
/etc/apt/apt.conf.d/proxy.conf
Acquire {
HTTP::proxy "http://proxy_server:port/";
HTTPS::proxy "http://proxy_server:port/";
}
https://linuxiac.com/how-to-use-apt-with-proxy/
下面是 man apt-get 的摘录。使用 upgrade 时应遵守以下规则:在任何情况下都不得删除当前已安装的软件包,也不得检索和安装尚未安装的软件包。如果这对你很重要,那就用 apt-get upgrade
。如果你想让一切 "正常运行",你可能需要使用apt-get dist-upgrade
来确保依赖关系得到解决。
upgrade 用于从/etc/apt/sources.list 列举的源中安装系统当前安装的所有软件包的最新版本。当前安装的软件包如果有新版本可用,则会被检索和升级;在任何情况下,当前安装的软件包都不会被移除,尚未安装的软件包也不会被检索和安装。当前已安装的软件包的新版本,如果不能在不改变其他软件包安装状态的情况下升级,则会保留其当前版本。必须先进行更新,以便 apt-get 知道新版本的软件包可用。
除了执行升级功能外,dist-upgrade 还能智能地处理与新版本软件包的依赖关系变化;apt-get 有一个 "智能 "的冲突解决系统,它会尝试升级最重要的软件包,而命令可能会删除某些软件包。/etc/apt/sources.list文件包含一个位置列表,可以从中获取所需的软件包文件。另请参阅 apt_preferences(5),了解覆盖个别软件包常规设置的机制。
deb http://deb.debian.org/debian bookworm main
deb-src http://deb.debian.org/debian bookworm main
deb http://deb.debian.org/debian-security/ bookworm-security main
deb-src http://deb.debian.org/debian-security/ bookworm-security main
deb http://deb.debian.org/debian bookworm-updates main
deb-src http://deb.debian.org/debian bookworm-updates main
Since the colors worked fine while being loggged in directly, I just un-uncommented the line force_color_prompt=yes
in the file ~/.bashrc
, that gave me colors over ssh, too:
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
(Ubuntu 18.04 LTS)
https://askubuntu.com/questions/16336/how-to-get-coloured-terminal-over-ssh
# apt install sudo
adduser
command. Use a strong password for the new user. You can enter values for the user information, or press ENTER
to leave those fields blank.# adduser example_user
Adding user `example_user' ...
Adding new group `example_user' (1001) ...
Adding new user `example_user' (1001) with group `example_user' ...
Creating home directory `/home/example_user' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for example_user
Enter the new value, or press ENTER for the default
Full Name []: Example User
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
# adduser example_user sudo
# su - example_user
Verify you are the new user with whoami
, then test sudo access with sudo whoami
, which should return root.
$ whoami
example_user
$ sudo whoami
[sudo] password for example_user:
root
How to use Sudo on a Vultr Cloud Server