1 Ubuntu Desktop Install
1.1 Ubuntu Desktop Version
- Ubuntu 14.04.5 LTS Desktop (64-bit)(supported until April 2019)
- Ubuntu 14.04.6 LTS Desktop (64-bit)
- Ubuntu 16.04.5 LTS Desktop (64-bit)
- Ubuntu 16.04.6 LTS Desktop (64-bit)
- Ubuntu 18.04.1 LTS Desktop (64-bit)
- Ubuntu 18.04.2 LTS Desktop (64-bit)
- Ubuntu 18.10 Desktop (64-bit)
- Ubuntu Download
1.2 Create a bootable USB stick on Windows
- Rufus, a free and open source USB stick writing tool. Download Rufus 3.5
2 Install
- Using apt search and install packages xxx
sudo apt-cache search xxx
sudo apt install xxx
- xxx.deb
sudo dpkg -i xxx.deb
sudo apt install -f
sudo apt install ./xxx.deb
- xxx.bin
sudo chmod +x xxx.bin
sudo ./xxx.bin
- .sh
sudo chmod +x xxx.sh
./xxx.sh
- pinyin
sudo apt install ibus-pinyin
sudo reboot
- chromium
sudo apt install chromium-browser
- vim
sudo apt install vim
sudo apt install ./teamviewer_xxx_[arch].deb
- ssh
sudo apt install openssh-server
sudo service ssh start
# could not load host key
sudo dpkg-reconfigure openssh-server
sudo service ssh status
- The easiest way to install for Debian/Ubuntu based distributions is to download and install the .deb package (64-bit) either through the graphical software center if it’s available or through the command line with:
sudo dpkg -i <file>.deb
sudo apt install -f # Install dependencies
- The repository and key can also be installed manually with the following script:
Then update the package cache and install the package using:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt install apt-transport-https
sudo apt update
sudo apt install code # or code-insiders
- git
sudo apt install git
git config --global user.name "xxx"
git config --global user.email "你的邮箱地址"
ssh-keygen -C 'you email address@gmail.com' -t rsa
3 Operation
- Update and upgrade
sudo apt update
sudo apt upgrade
- /etc/apt/souce.list
sudo gedit /etc/apt/souce.list
- Add and delete PPA
sudo add-apt-repository ppa:user/ppa-name
cd /etc/apt/sources.list.d/
- Clear apt
sudo apt automove
sudo apt clean
sudo apt autoclean
sudo du -sh /var/cache/apt
- apt-key
sudo apt-key list
sudo apt-key add xxx
sudo apt-key del xxx
sudo apt-key update
- trash
cd .local/share/Trash/
sudo rm -rf .local/share/Trash/*
- Free up cache memory
sudo du -sh .cache/thumbnails
sudo rm -rf .cache/thumbnails/*
- Create file and folder
sudo touch xxx.xxx
sudo mkdir xxx
- Unzip
# xxx.zip
sudo unzip xxx.zip
# xxx.rar
sudo unrar x xxx.rar
# xxx.tar.gz
sudo tar zxvf xxx.tar.gz
- IP
sudo gedit /etc/network/interfaces
sudo /etc/init.d/networking restart
ifconfig
- pip
pip install --upgrade xxx
- Check memory space
df -hl
- Add USB external hard disk
sudo apt install ntfs-3g
sudo reboot
sudo fdisk -l
sudo mkdir /media/*/usbhdd0 # *: username
sudo chown *:* /media/*/usbhdd0
sudo mount -t auto -o uid=*,gid=* /dev/sd*1 /media/*/usbhdd0
- Load external hard disk
sudo mount /dev/sda1 /media/pi/usbhdd
sudo umount /dev/sda1
- Add source .sh
sudo gedit .bashrc
source /xxx/xxx/xxx/xxx.sh
- Xilinx drivers Vivado
cd /xxx/Xilinx/SDK/xxx/data/xicom/cable_drivers/lin64/install_script/install_drivers
sudo ./install_drivers
# or
sudo ./install_digilent.sh
功能 | 快捷键 |
---|---|
打开Terminal | Ctrl+Shift+T |
自动补全 | Tab |
4 Windows上运行Ubuntu
4.1 配置WIndows环境
控制面板——程序——启用或关闭Windows功能——适用于Linux的Windows子系统
设置——更新和安全——开发者选项——开发人员模式
4.2 SSH
- 1 安装openssh-server
sudo apt install openssh-server
# sudo apt install openssh-client
- 2 备份配置文件
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
- 3 修改配置文件
sudo vim /etc/ssh/sshd_config
Port 23 # 端口22被占用
ListenAddress 0.0.0.0
PasswordAuthentication yes # 允许密码登录
4.3 安装桌面
4.3.1 Windows上安装VcXsrv
4.3.2 Ubuntu内安装桌面环境
sudo apt install ubuntu-desktop unity compizconfig-settings-manager
export DISPLAY=localhost:0
ccsm
sudo compiz
操作
- shadow
密码域密文由三部分组成的,即:$id$salt$encrypted。
- id为1时,采用md5进行加密;
- id为5时,采用SHA256进行加密;
- id为6时,采用SHA512进行加密。
openssl passwd -id -salt 'xxx' 'xxx'