山姆的編程實作分享。。。

Sam Blog, Sam Sharing, Sam Studio

顯示具有 Ubuntu 標籤的文章。 顯示所有文章
顯示具有 Ubuntu 標籤的文章。 顯示所有文章

2021年1月9日

[Python] Change Python3 as the default version on Ubuntu


Python default version on Ubuntu 18.04 LTS

The default version of Python on Ubuntu 18.04 is Python 2, that is, if you run“python”command in the Terminal,  the Python 2 engine will be executed. Even if you have installed Python 3.5 or higher version.

A solution to change Python3 as the default version

    sudo update-alternatives --install /usr/bin/python python /usr/bin python3 1



2020年10月16日

[Ubuntu] Open VSCode & Sublime-Text Editors from Terminal


 For Visual Studio Code

Just use command code to open Visual Studio Code from Terminal

         For example: code path/of/file 



For Sublime Text editor 

Just use command subl to open Sublime Text editor  from Terminal

         For example: subl path/of/file 



2020年10月14日

Mount a Physical disk to VMware ( 掛接實體硬碟 )


為了加速 VM 的執行速度,VM App 以及 Virtual Disk 都是存放在 SSD,

最近 SSD  的空間開始吃緊了,所以想在 Ubuntu 18.04 上再掛接 (Mount) 

顆實體硬碟。

Steps:

1: Power off  your VM on VMware Workstation

2: Select your VM and edit virtual machine settings 

3: on "Hardware" Tab, Select "Add..."

4: Select "Add -> Hard disk"

5. Select "Use a Physical Disk"

6. Select a Physical Disk ( a partition or entire disk, as required )

在這裡,我是掛接 EXT4 Partition, 在 Windows 10 的系統下是不會使用的,

若是你要掛接的 Partition 在原系統 (Host) 會使用到,

就請參考底下連接 ( VMWare 原始說明 )。





Mount a Physical disk on VMware Workstation

2020年9月24日

[Error] /usr/bin/env ‘python’ no such file or directory


For this error, please try below 3 possible solutions


# Possible Solution 1

You may not install Python yet, please follow below command to install it

sudo apt install python3.7


# Possible Solution 2

You have installed Python3, but "python" command is not equal to "python3" 

Please follow below command to let them equal (Ubuntu 20.04)

sudo apt install python-is-python3


# Possible Solution 3

Symptom is same as  "Possible Solution 2", but OS is Ubuntu 16.04.

Please follow below commands to create a symlink

whereis python3

run above command to get Python and Python3 installed directory\ies

sudo ln -s /usr/bin/python3 /usr/bin/python

run above command to create a symlink, the /usr/bin/python3 and /usr/bin/python are examples, please instead by the result of "whereis python3" command



2019年4月12日

It's time to use Linux / Ubuntu by using Windows Subsystem



The Windows 10 build 14393 or later version is ready to Linux installation by using the Windows Subsystem.

By this way you don't need to setup a virtual machine or reboot into Linux by using a dual-boot PC.

The detail installation guide for Linux on Windows system, please follow below two links

https://www.makeuseof.com/tag/linux-beginners-guide/

https://www.makeuseof.com/tag/linux-desktop-windows-subsystem/







2017年9月5日

遠端桌面連線 Ubuntu to Ubuntu by VNC


Step1 : Server side, install tightvncserver by running below command
$ sudo apt-get install tightvncserver

Step2 : setup a password for remote access by running below command
$ vncserver

Step3 : Normally , the Ubuntu already has installed "remote desktop viewer"
if not, please go to Ubuntu Software Center to install it first
if yes, please
a.) execute remote desktop viewer
b.) press "Connect" -> select "VNC" protocol -> then press "Find" to select what server you want to connect to

2014年6月21日

遠端桌面連線 Mac to Ubuntu by VNC ( Remote Desktop Control Mac to Ubuntu )


Ubuntu Side

Step1: Enable desktop sharing at Ubuntu side and setup the password for Desktop sharing connection




Step2: Check Ubuntu IP address, in my test, my IP address of IBM NB is 10.0.1.28



Step3: Ubuntu side is done


iMac Side

Step1: install VNC Viewer for Google Chrome from Chrome store



Step2: after installed, open it then

  1. input IP address of Ubuntu side
  2. input password that you set at Ubuntu step1 




Step3: if everything is correct, you will see the Ubuntu desktop in your iMac  :-)


2014年5月5日

熱門文章