個人資料
歸檔
正文

linux

(2022-03-31 12:06:08) 下一個

1.install anydesk

lsb_release -a
sudo -i
wget -qO - https://keys.anydesk.com/repos/DEB-GPG-KEY | apt-key add -
echo "deb http://deb.anydesk.com/ all main" > /etc/apt/sources.list.d/anydesk.list

sudo apt-get install libcanberra-gtk-module; sudo apt install anydesk
apt --fix-broken install
anydesk &

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

https://download.anydesk.com/linux/  5.5.6.1-amd64 https://forum.kde.org/viewtopic.php?f=309&t=173204 

change default boot OS: https://www.psychocats.net/ubuntu/bootmenu 

2.VNCserver

https://serverspace.us/support/help/install-tightvnc-server-on-ubuntu-20-04/

sudo apt-get install xfonts-75dpi

sudo apt-get install xfonts-100dpi

vncserver -geometry 1630x930banyan

3.grep

grep . -name

grep -Ril "text-to-find-here"

grep -R string ./

4.Compare and merge: sudo apt-get install meld

5.Linux on windows10/11

https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support#1-overview

https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-10#1-overview 

可以忽略鏈接,先用task manager|process看虛擬機已enabled,再admin運行powershell,wsl --install -d ubuntu(W11用wsl --install ubuntu)。wsl --set-default-version 2

https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps 

X11 missing font: 是因為缺了export LC_ALL=C,要永久解決需加文件:
$ vi /home/[username]/.bash_profile
LC_ALL=C
export LC_ALL
$ echo $LC_ALL               //看到顯示C而非空白就可以了
C

wsl2還是有許多錯誤,但是它確實運行了linux發行版。wsl1就不要用了,垃圾。

6.Ckermit

sudo apt install build-essential -y
sudo apt-get install manpages-dev -y
sudo apt-get install libncurses5-dev libncursesw5-dev -y
sudo apt-get install libpam0g-dev -y
sudo apt install megatools -y
mkdir kermit;cd kermit
wget https://src.fedoraproject.org/lookaside/pkgs/ckermit/cku302.tar.gz/eac4dbf18b45775e4cdee5a7c74762b0/cku302.tar.gz
tar xzvf cku302.tar.gz
https://mega.nz/file/DL4nnZhD#1-Wr-QnywqsjNFxMstz4L0b8cf3eBPv6vt9DycpGoUY  的kermit.zip下載轉換為此命令:
megadl 'https://mega.nz/#!DL4nnZhD!1-Wr-QnywqsjNFxMstz4L0b8cf3eBPv6vt9DycpGoUY'
unzip kermit.zip
make clean; make linux
sudo mv wermit /usr/local/bin/kermit
which kermit

7.幾個命令

7.1 升級

sudo apt update && sudo apt upgrade

sudo do-release-upgrade #會升級到比舊版高一的版本

https://www.cyberciti.biz/faq/upgrade-ubuntu-20-04-lts-to-22-04-lts/#Upgrade_to_22.04_LTS_using_the_CLI

7.2 創建可加裝並帶存儲的Ubuntu live USB

sudo add-apt-repository ppa:mkusb/ppa
sudo apt update

sudo apt install --install-recommends mkusb mkusb-nox usb-pack-efi

lsblk   #plugin 16GB USB, 用此命令看設備名例如

下載好Ubuntu lts 20.04.iso,運行mksub,選install,Persistent live,traditiona模式(此項上麵鏈接沒有是新功能,第二項),選iso文件,upefi,指定persistence的比例 (除iso外剩餘空間做為Ubuntu係統存儲的比例,若選20%則大概有2G分區名為casper-rw 類型ext4,其餘為usbdata分區類型ntfs),Go。完成後會顯示Done,若出錯需冷啟動linux PC重新運行mkusb。https://www.howtogeek.com/howto/14912/create-a-persistent-bootable-ubuntu-usb-flash-drive/ 

成功後運行USB上的Ubuntu live,安裝:

sudo apt install ntfs-3g   #Fodora/Centos/RHEL是sudo dnf install ntfs-3g

用lsblk看盤設備名,編輯/etc/fstab增加開機安裝命令如:

mount /dev/sda3 /mnt/media/drive_location_here

https://www.makeuseof.com/mount-ntfs-windows-drives-in-linux/ 

 

 

 

[ 打印 ]
閱讀 ()評論 (0)
評論
目前還沒有任何評論
登錄後才可評論.