Ubuntu 管理心得

搜尋此網誌

2020年11月1日 星期日

Create Reference and citations in word

  1. Use JabRef to export MS word xml from bib file, say 110year.xml
  2. Inside word, click 參考資料 -> 管理來源 -> 瀏覽,select 110year.xml
    select all on the left, 複製 to the right panel

    click 關閉
  3.  Click 書目,

2020年10月23日 星期五

Expand vmware Mac OS disk

  1. Expand disk size in vm setting, say to 60GB
  2. Inside mac os guest, open disk utility 
  3. Select  容器->My29GB - Data. (not My29GB)
  4. click 分割 tab 
  5. Keyin new size in 大小. The size should be less than 60GB as in step 1. 
  6. click 套用
  7. Done

 

2020年10月6日 星期二

Use rsync to ssh on custom port

rsync -auvzpP -e 'ssh -p 7922' Fuzzy/Literature/IntuitionisticFuzzyNumber/ chiao@kpcp4.au.edu.tw:/home/chiao/Fuzzy/Literature/IntuitionisticFuzzyNumber

2020年10月3日 星期六

LyX Mathematica with condition

 Put a condition follows the equation:

Simplify[ x 2 ,{ -1<x<0 } ] =-x
  
 

2020年9月26日 星期六

Ubuntu 18.04.4 LTS Hardware Enablement Stack (HWE)

 

sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

set permanent dns

Edit /etc/systemd/resolved.conf, add this line:

DNS=192.168.1.1

or 

DNS=<what-u-want>

 

Then restart ubuntu.


2020年9月18日 星期五

Plural or single noun with multiple adjectives

 cf: https://english.stackexchange.com/questions/221331/plural-or-singular-noun-when-it-refers-to-two-things-in-a-list


The followings are right.

I have a left and a right arm.

I have left and right arms.

Everyone has left and right arms. [This is correct]

The followings are wrong.

I have an old and a new cars.

I have old and new car.

2020年7月24日 星期五

Do not forget rerun unlocker

If install new version of vmware, do not forget to run unlocker again, otherwise the MacOS (e,g, catalina ) cannot boot.

2020年7月16日 星期四

sudo without password

Disable sudo password for all the members of sudoers group.

sudo visudo and add this line:  
%sudo   ALL=(ALL:ALL) NOPASSWD:ALL

2020年7月13日 星期一

openconnect ssl vpn

sudo apt install openconnect
Run this command:

sudo openconnect https://au.twaren.net/staff --protocol=nc


2020年7月11日 星期六

Repeat duplicate items in legend in Matplotlb jupyter

In unbuntu 18.04 this is not an error, however, it will produce duplicated legend in ubuntu 20.04. According to https://stackoverflow.com/questions/19385639/duplicate-items-in-legend-in-matplotlib, if plot the same line type twice, then it will produce the same lengend for the same line.
Therefore, I have to break the oringial one line into two lines:

    ax.plot(x, yU, Label=i,linewidth=2, dashes=dst,color='black')
    ax.plot(x, yL, linewidth=2, dashes=dst,color='black')
NB, the legend is removed from the second line.

2020年6月29日 星期一

update grub efi from grub pc for gpt uefi


  1. make a fat32 partition of size 10M, e.g. /dev/sda1
  2. sudo mkdir /boot/efi
  3. put this line into /etc/fstab
    UUID=4CA9-C727  /boot/efi       vfat    umask=0077      0       1
  4. sudo mount -a
  5. purge old grub-pc, e.g.
  6. install grub-efi. e.g.  apt install grub-efi
  7. sudo update-grub
  8. sudo grub-install
  9. Done.

Using ubuntu live CD and suppose /mnt/2 contains all the old operation system, say ubuntu 18.04.
cd /mnt/2
mount -B /dev dev
mount -B /dev/pts dev/pts
mount -B /proc proc
mount -B /sys sys
mount -B /run run

cd /
chroot /mnt/2
vim /etc/hosts, add this line:
140.110.240.80 tw.archive.ubuntu.com 
 
To find where efi, say sda2, then
mount /dev/sda2 /boot/efi
apt purge grub-pc
apt update
apt install grub-efi

update-grub
grub-install
exit

umount /mnt/2/dev/pts
umount /mnt/2/dev
umount /mnt/2/proc
umount /mnt/2/sys
umount /mnt/2/run








網誌存檔