每次我在 Windows 10 上打开 WSL Ubuntu 18.04,我都希望自动运行这些设置。
我尝试在 /etc/init.d/ 中使用以下内容创建 .sh 脚本,但它没有起作用。
alias desktop='cd /mnt/c/Users/Dot/Desktop/ai_files'
export PYTHONPATH=${PYTHONPATH}:${HOME}/ai-safety-gridworlds
export DISPLAY=localhost:0.0
我尝试在 /etc/init.d/ 中使用以下内容创建 .sh 脚本,但它没有起作用。
#!/bin/bash
alias desktop='cd /mnt/c/Users/Dot/Desktop/ai_files'
export PYTHONPATH=${PYTHONPATH}:${HOME}/ai-safety-gridworlds
export DISPLAY=localhost:0.0
.bashrc
文件中(假设您正在使用bash)。 - MrPrometheecd ~
- JamesD