General
sudo apt install hardinfo
lsb_release -a # linux standard base returns 20.04
lspci | grep Realtek
uname -a # 5.8.0 or 5.13
sudo hostname ricky-pc
tool
sudo apt-get install ncdu
# use up down left right q c
ufw
sudo ufw status
# Status: inactive
sudo ufw enable
sudo ufw status
# Status: active
ufw status numbered
ufw delete 1
sudoer
sudo nano /etc/sudoers # or sudo visudo
# add line to bottom, must be after $sudo line
leungric ALL=(ALL:ALL) NOPASSWD:ALL
sudo ls -al /root
# no prompt
ssh
sudo apt install ssh
sudo systemctl enable --now ssh
sudo systemctl status ssh
sudo ufw allow ssh/tcp
rdp (not quite working)
sudo apt-get install -y xrdp
sudo systemctl enable xrdp
vnc (ugly but working)
# https://tecadmin.net/install-vnc-server-on-ubuntu-20-04/
sudo apt install tigervnc-standalone-server -y
vncpasswd
# enter 8 char pw
vncserver -localhost no
# New '1037u:1 (leungric)' desktop at :1 on machine 1037u
# Starting applications specified in /home/leungric/.vnc/xstartup
# Log file is /home/leungric/.vnc/1037u:1.log
# Use xtigervncviewer -SecurityTypes VncAuth,TLSVnc -passwd /home/leungric/.vnc/passwd 1037u:1 to connect to the VNC server.
vncserver -list
# X DISPLAY #RFB PORT #PROCESS ID
# :1 5901 2141
sudo ufw allow 5901/tcp
sudo ufw status
# 5901/tcp ALLOW anywhere
# Windows TightVNC Viewer 192.168.1.103:1
# guacamole 192.168.1.103 5901 can work
vnc "authentucation is required to create a color profile" (working in 2022)
# https://devanswers.co/how-to-fix-authentication-is-required-to-create-a-color-profile-managed-device-on-ubuntu-20-04-20-10/
vnc, CTRL ALT T, nautilus
sudo nano /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf
polkit.addRule(function(action, subject) {
if ((action.id == "org.freedesktop.color-manager.create-device" ||
action.id == "org.freedesktop.color-manager.create-profile" ||
action.id == "org.freedesktop.color-manager.delete-device" ||
action.id == "org.freedesktop.color-manager.delete-profile" ||
action.id == "org.freedesktop.color-manager.modify-device" ||
action.id == "org.freedesktop.color-manager.modify-profile") &&
subject.isInGroup("{users}")) {
return polkit.Result.YES;
}
});
sudo reboot
vncserver -kill :2
vncserver -localhost no
vnc-server -list
# Windows 10 TightVNC Viewer 192.168.1.103:3
# a working xfce4 xstartup
cat xstartup.working.xfce
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
startxfce4 &
vnc service (seems better)
# https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-20-04
Python
sudo apt install python3-distutils
sudo apt install python3-apt
sudo apt install python3-pip
sudo apt install python-is-python3
Office
sudo apt install thunderbird
sudo apt install openvpn unzip network-manager-openvpn
sudo apt install vim
Chrome
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb
wget -O- https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | sudo tee -a /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' |\
sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
sudo apt update && sudo apt install signal-desktop
C++
sudo apt install make
sudo apt install gcc
sudo snap install netbeans --classic
Java Eclipse
sudo apt update
sudo apt install default-jre
sudo snap install --classic eclipse
Wireshark
sudo apt install wireshark
Editors
sudo apt install ghex
# sublime, vscode, notepad++(ugly)
沒有留言:
張貼留言