在windows下,如果要在console下命令,根據檔名開啟預設的應用程式
start 123.txt # 開啟預設文字編輯器
start http://www.google.com #開啟預設的瀏覽器
start mailto:admin@123.com //開啟預設的email軟體
若是在linux 下,使用的是gnome
gnome-open 123.txt
gnome-open http://www.google.com
gnome-open mailto:admin@123.com
參考 Open a file from the command line using its default application