跳转到主要内容

dotnet系列

环境配置

//查找指定命令、源文件、手册页等相关文件的位置
whereis dotnet
//显示当前系统的PATH环境变量的值
echo $PATH

//添加永久dotnet运行命令
echo "export PATH=/usr/local/share/dotnet/dotnet8:/usr/local/share/dotnet/dotnet8/tools:$PATH" >> ~/.bash_profile

//重新加载
source ~/.bash_profile

#编译打包
dotnet publish -r linux-x64 /p:PublishSingleFile=true

//临时系列,建议走最下面的守护进程方式
#启动
./[程序名] --urls http://0.0.0.0:[端口号]
#nohup
nohup ./[程序名] --urls http://0.0.0.0:[端口号] &
#查看
tail -f nohup.out