MobaXterm + Jupyter Notebook 在本地打开服务器上运行的 Jupyter程序
时间: 2024-04-05 10:12:05 浏览: 299
首先,确保你已经在服务器上启动了Jupyter Notebook,并且已经开放了对应端口。比如,如果你将Jupyter Notebook运行在服务器的8888端口上,则需要在防火墙中打开该端口,或者使用SSH端口转发将服务器端口转发到本地。
接下来,你需要在本地安装MobaXterm,并且启动它。在MobaXterm的主界面中,点击“Session”按钮,选择“SSH”选项卡,输入服务器的IP地址和用户名,点击“OK”按钮连接到服务器。
连接成功后,你可以在MobaXterm的终端窗口中输入以下命令,将服务器上的Jupyter Notebook端口转发到本地端口:
```
ssh -L 8888:localhost:8888 user@server_ip
```
其中,8888是服务器上Jupyter Notebook的端口号,user是服务器的用户名,server_ip是服务器的IP地址。执行该命令后,你需要输入服务器的密码进行身份验证。
转发完成后,你可以在本地浏览器中输入以下网址,打开Jupyter Notebook:
```
http://localhost:8888
```
这样,你就可以在本地使用Jupyter Notebook编辑和运行服务器上的程序了。
相关问题
mobaxterm使用jupyter notebook
MobaXterm是一款强大的远程计算机管理工具,它可以让你在Windows操作系统上方便地使用Jupyter Notebook。以下是使用MobaXterm连接到远程服务器,并使用Jupyter Notebook的步骤:
1. 打开MobaXterm软件,在主界面上点击“Session”按钮。
2. 在弹出的窗口中选择“SSH”选项卡,并输入你要连接的远程服务器的IP地址和用户名,然后点击“OK”按钮。
3. 在连接成功后,你会看到一个命令行界面。在命令行中输入以下命令来安装Anaconda:
```
wget https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh
bash Anaconda3-5.1.0-Linux-x86_64.sh
```
4. 安装完成后,在命令行中输入以下命令来启动Jupyter Notebook:
```
jupyter notebook --no-browser
```
5. 在命令行中会显示一个网址(类似于http://localhost:8888/?token=...),将该网址复制到本地浏览器的地址栏中并打开,就可以使用Jupyter Notebook了。
6. 如果你想让其他人也能够访问你的Jupyter Notebook,可以在命令行中输入以下命令:
```
jupyter notebook --no-browser --ip=0.0.0.0 --port=8888
```
这样,其他人就可以通过访问你的服务器的IP地址和8888端口来访问你的Jupyter Notebook了。
mobaXterm jupyter notebook
mobaXterm是一种终端仿真软件,它允许用户在Windows操作系统上使用类Unix的命令行界面。它也支持运行Jupyter Notebook。要在mobaXterm中使用Jupyter Notebook,你可以按照以下步骤进行操作:
引用中提到,首先需要安装Jupyter Notebook。你可以使用以下命令在mobaXterm中安装Jupyter Notebook:
pip3 install jupyter
接下来,生成Jupyter配置文件。使用以下命令:
jupyter notebook --generate-config
生成的配置文件路径是.jupyter/jupyter_notebook_config.py,它位于隐藏目录.jupyter/中。你可以用以下命令打开这个文件:
gedit .jupyter/jupyter_notebook_config.py
在打开的文件末尾,添加以下内容:
c.NotebookApp.ip = '*'
c.NotebookApp.port = 6000
c.NotebookApp.password = u'刚刚生成的密码序列'
c.NotebookApp.open_browser = False
保存并关闭文件。现在,你可以启动Jupyter Notebook。在mobaXterm中,使用以下命令:
jupyter notebook
这将启动Jupyter Notebook服务器,并显示服务器正在运行的端口号。你可以在浏览器中访问"http://localhost:端口号"来打开Jupyter Notebook界面。记住,你需要使用刚刚生成的密码序列来登录。这样,你就可以在mobaXterm中使用Jupyter Notebook了。
阅读全文
相关推荐
















