[GMT] GMT Wednesday – Install GMT in Ubuntu under Win10

A new semester has begun. I am once again the teaching assistant of the Generic Mapping Tool (GMT) class in NTU, Taiwan. From this week, I will share some class materials to help those who just start to learn GMT.

This week, I’ll share install GMT in Ubuntu on Win10. From last few months, Microsoft has enabled the Linux subsystem on the latest version of Windows 10. We will not need install the dual-OS which costs lots of resources.

The main benefit install the GMT under Linux/Unix-like system is that you can run all the GMT examples. Also many useful programs is pre-installed in Linux like ‘awk’.

Enable the support of Windows Subsystem for Linux

  • Open “Control Panel” (控制台)
  • Search “optional features”(開啟或關閉 Windows 功能)
  • check ” Windows Subsystem for Linux”(適用於Linux的Windows子系統)
  • ckick “OK”

You may be ask to reboot after installed the Windows subsystem for Linux.

Install Linux distibutions

  • Open “Microsoft Store”
  • Search “Ubuntu”
  • Click “get” to install
  • After installation, launch the ubuntu app.
  • It needs some time to install. After few minutes, ubuntu will ask you to set an account name and password. (they are not related to Windows account)

Update the Ubuntu system

  • Use the following command to get the update list:
    sudo apt update
  • Use the following command to upgrade programs:
    sudo apt upgrade

Follow the instructions on the screen.

Install Generic Mapping Tools (GMT)

Use the following command to install the GMT program:

sudo apt install gmt gmt-dcw gmt-gshhg ghostscript

Note

To access the Windows files, the Windows drives will be mount under “/mnt” directory. e.g, /mnt/d/example = D:\example

It takes about 400MB to install GMT and ghostscript

References

  • https://docs.microsoft.com/en-us/windows/wsl/install-win10
  • https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_install/how-to-enable-the-windows-subsystem-for-linux/16e8f2e8-4a6a-4325-a89a-fd28c7841775?auth=1

 


請多多指教!

這個網站採用 Akismet 服務減少垃圾留言。進一步瞭解 Akismet 如何處理網站訪客的留言資料