<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/rstudio-v1-1-preview-terminal/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://blog.rstudio.com/2017/08/11/rstudio-v1-1-preview-terminal/"> RStudio Blog</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>Today we’re excited to announce availability of our first Preview Release for RStudio 1.1, a major new release which includes the following new features:</p>
<ul>
<li>A <strong>Connections</strong> tab which makes it easy to connect to, explore, and view data in a variety of databases.</li>
<li>A <strong>Terminal</strong> tab which provides fluid shell integration with the IDE, xterm emulation, and even support for full-screen terminal applications.</li>
<li>An <strong>Object Explorer</strong> which can navigate deeply nested R data structures and objects.</li>
<li>A new, modern <strong>dark theme</strong> and Retina-quality icons throughout.</li>
<li>Improvements to the <a rel="nofollow" href="https://github.com/rstudio/rstudioapi" target="_blank">RStudio API</a> which add power and flexibility to RStudio add-ins and packages.</li>
<li>RStudio Server Pro support for floating licensing, notifications, self-service session management, a library of professional ODBC drivers, and more.</li>
<li>Dozens of other small improvements and bugfixes.</li>
</ul>
<p>You can try out these new features in the <a rel="nofollow" href="http://www.rstudio.com/products/rstudio/download/preview/" target="_blank">RStudio Preview Release</a>.</p>
<h2>Terminal</h2>
<p>Over the next few weeks we’ll be blogging about each of these new features. We start today with an overview of the integrated support for full-featured system terminals via the <strong>Terminal tab</strong>.</p>
<p>The Terminal tab provides access to the system shell within the RStudio IDE. Potential uses include advanced source-control operations, execution of long-running jobs, remote logins, and interactive full-screen terminal applications (e.g. text editors, terminal multiplexers).</p>
<h3>Opening Terminals</h3>
<p>The Terminal tab is next to the Console tab. Switch to the Terminal tab to automatically create a new terminal, ready to accept commands. If the tab isn’t visible, show it via <strong>Shift+Alt+T</strong> or the <strong>Tools -> Terminal -> New Terminal</strong> menu. Here’s a terminal with the output of some simple commands:</p>
<p><img alt="Basic terminal example" src="https://i1.wp.com/blog.rstudio.com/images/2017-08-07-1_1_term-simple.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Support for xterm enables use of full-screen programs:</p>
<p><img alt="Terminal running vim" src="https://i2.wp.com/blog.rstudio.com/images/2017-08-07-1_1_term_vim.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Additional terminal sessions can be started using the <strong>New Terminal</strong> command on the terminal drop-down menu, or via <strong>Shift+Alt+T</strong>.</p>
<p><img alt="Terminal dropdown menu" src="https://i1.wp.com/blog.rstudio.com/images/2017-08-07-1_1_term_dropdown.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Each terminal session is independent, with its own system shell and buffer. Switch between them using the arrows next to the drop-down menu or by clicking on the terminal’s name in that menu.</p>
<p><img alt="Multiple terminal example" src="https://i1.wp.com/blog.rstudio.com/images/2017-08-07-1_1_term_multiple.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Programs running in a terminal do not block the rest of the RStudio user-interface, so you can continue working in RStudio even when the terminal is busy. On Mac, Linux, or Server, a busy terminal will have <strong>(busy)</strong> next to its name, and the close [x] changes to a <strong>stop</strong> button:</p>
<p><img alt="Busy terminal example" src="https://i1.wp.com/blog.rstudio.com/images/2017-08-07-1_1_term_busy.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>If there is a busy terminal (Mac, Linux, or Server) trying to exit RStudio (or any other operation that will stop the current R session) will give a warning. Proceeding will kill the running programs.</p>
<p><img alt="Busy terminal example" src="https://i2.wp.com/blog.rstudio.com/images/2017-08-07-1_1_term_warn.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h3>Run in Terminal</h3>
<p>When editing a shell script in RStudio, the <strong>Run Selected Line(s)</strong> command (<strong>Cmd+Enter</strong> on Mac / <strong>Ctrl+Enter on others</strong>) executes the current line, or selection, in the current terminal. This can be used to step through a shell script line-by-line and observe the results in the terminal.</p>
<p>Here’s an example where Cmd+Enter was hit three times, with focus on the editor and the cursor starting on the first line.</p>
<p><img alt="Run a shell script line-by-line" src="https://i1.wp.com/blog.rstudio.com/images/2017-08-07-1_1_term_run.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>In other text file types, including R source files, the new <strong>Send to Terminal</strong> command (<strong>Cmd+Alt+Enter</strong> on Mac, <strong>Ctrl+Alt+Enter</strong> on others) may be invoked to send the current selection to the current terminal. This can be handy for other languages with a command-line interpreter. Below, Python was started in the current terminal, then <strong>Cmd+Alt+Enter</strong> was used to step through each line of the Python source file.</p>
<p><img alt="Python example" src="https://i2.wp.com/blog.rstudio.com/images/2017-08-07-1_1_term_python.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h3>Closing Terminals</h3>
<p>To close a terminal session, use the Close Terminal command on the Terminal dropdown menu, click the [x] on the far-right of the Terminal pane toolbar, or exit from within the shell itself.</p>
<p>If the Terminal tab is not useful to your workflows, simply click the [x] on the tab itself to close it, and it will not reappear in future RStudio sessions. To restore the tab, start a terminal via the <strong>Tools/Terminal/New Terminal</strong> menu command.</p>
<h3>Terminal Options</h3>
<p>Various aspects of the terminal can be configured with the new Terminal Options pane. Invoke with Tools/Global Options… and click on the Terminal icon.</p>
<p><img alt="Terminal Options" src="https://i1.wp.com/blog.rstudio.com/images/2017-08-07-1_1_term_options.png?w=456&ssl=1" data-recalc-dims="1"></p>
<h3>Windows-Specific Shell Options</h3>
<p>On the RStudio IDE for Microsoft Windows, you can select between Git-Bash, Command Prompt, Windows PowerShell, or the Windows Subsystem for Linux. The choices available depend on what is installed on the system.</p>
<p><img alt="Windows shell options" src="https://i1.wp.com/blog.rstudio.com/images/2017-08-07-1_1_term_winshell.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>We look forward to seeing how people use the Terminal tab in RStudio 1.1. If you want to give it a test drive, please download the <a rel="nofollow" href="http://www.rstudio.com/products/rstudio/download/preview/" target="_blank">RStudio Preview Release</a>.</p>
<p>We hope you try out the preview and <a rel="nofollow" href="https://support.rstudio.com/" target="_blank">let us know</a> how we can make it better.</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://blog.rstudio.com/2017/08/11/rstudio-v1-1-preview-terminal/"> RStudio Blog</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/lQVpQmqPf9o" height="1"></a></div>