“Couldn't find a file descriptor referring to the console” on Ubuntu bash on Windows

前端 未结 5 1050
你的背包
你的背包 2020-12-13 05:53

I\'m new in here and it\'s my first post.

I have a problem with Bash on Ubuntu on Windows. If I type \"open (filename)\" on Mac terminal, it opens the file with the

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-13 06:27

    For linux, use xdg-open. open is for Mac OS. open in linux is an name alias of openvt (open virtual terminal).

    To simplify it, you can append the following line to ~/.bashrc or ~/.zshrc depends on the shell you are using.

    alias o="xdg-open" # o stands for open 
    

    Then next time you can just type like the following to reduce some keyboard strokes.

    o file_name.pdf

提交回复
热议问题