CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/pages/features/terminal.tsx
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2022 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Layout } from "antd";
7
8
import { Icon } from "@cocalc/frontend/components/icon";
9
import Code from "components/landing/code";
10
import Comparison from "components/landing/compare";
11
import Content from "components/landing/content";
12
import Footer from "components/landing/footer";
13
import Head from "components/landing/head";
14
import Header from "components/landing/header";
15
import Info from "components/landing/info";
16
import SignIn from "components/landing/sign-in";
17
import Snapshots from "components/landing/snapshots";
18
import { Paragraph, Title } from "components/misc";
19
import A from "components/misc/A";
20
import { Customize } from "lib/customize";
21
import withCustomize from "lib/with-customize";
22
import { FullLinuxTerminal } from "./linux";
23
import shellScript from "/public/features/cocalc-shell-script-run.png";
24
import collabDemo from "/public/features/cocalc-terminal-collab.gif";
25
import logo from "/public/features/linux-logo.svg";
26
import stack from "/public/features/terminal-software.png";
27
import terminal from "/public/features/terminal.png";
28
29
const component = "a Linux Terminal";
30
const title = `Online Linux Terminal`;
31
32
export default function Terminal({ customize }) {
33
return (
34
<Customize value={customize}>
35
<Head title={title} />
36
<Layout>
37
<Header page="features" subPage="terminal" runnableTag="term" />
38
<Layout.Content>
39
<Content
40
landing
41
startup={component}
42
body={logo}
43
title={title}
44
subtitle={"A Linux Terminal that can't mess up your own computer."}
45
subtitleBelow={true}
46
image={terminal}
47
alt={"Running Sage in a Terminal"}
48
/>
49
50
<FullLinuxTerminal />
51
52
<SignIn startup={component} />
53
54
<Info.Heading
55
description={
56
<>There are many ways to use {component} online via CoCalc.</>
57
}
58
>
59
Feature Overview
60
</Info.Heading>
61
62
<Info
63
title="Realtime collaboration"
64
icon="users"
65
image={collabDemo}
66
anchor="a-realtimecollab"
67
alt={"Video showing synchronized terminals"}
68
wide
69
>
70
<Paragraph>
71
The same terminal can be opened by two or more users. Both see the
72
same view, which adaptively resizes to a common size.
73
</Paragraph>
74
<Paragraph>
75
Additionally, open a{" "}
76
<A href="https://doc.cocalc.com/chat.html">side chat</A> panel to
77
exchange thoughts and ideas.
78
</Paragraph>
79
<Paragraph>
80
This is ideal for getting advice by a colleague or{" "}
81
<A href="https://doc.cocalc.com/teaching-interactions.html">
82
helping a student of yours
83
</A>
84
.
85
</Paragraph>
86
</Info>
87
88
<Info
89
title="Run Bash, Python, R, etc."
90
icon="r"
91
image={shellScript}
92
anchor="a-shell-script"
93
alt={"Screenshot of editing and running a shell script"}
94
caption={
95
<>
96
Bash <Code>script.sh</Code> file (left),{" "}
97
<Code>bash -f script.sh</Code> to run (right)
98
</>
99
}
100
>
101
<Paragraph>
102
CoCalc's{" "}
103
<A href="https://doc.cocalc.com/frame-editor.html">
104
frame editor
105
</A>{" "}
106
supports <strong>editing script files</strong> side-by-side with a{" "}
107
<strong>
108
<A href="https://doc.cocalc.com/terminal.html">terminal</A>
109
</strong>
110
.
111
</Paragraph>
112
<Paragraph>
113
To get started, create a file with a suitable ending, e.g.{" "}
114
<Code>.py</Code>, <Code>.sh</Code>, <Code>.r</Code>, ... Then open
115
that file (via <Code>open filename.ext</Code>) and you can edit it
116
with <strong>syntax highlighting</strong>. Finally, split the
117
frame and select the Terminal, like you can see it in the
118
screenshot. Execute <Code>python3 script.py</Code>,{" "}
119
<Code>bash -f script.sh</Code>, ... to run it.{" "}
120
</Paragraph>
121
</Info>
122
123
<Info
124
title="Comprehensive software stack"
125
icon="server"
126
image={stack}
127
anchor="a-stack"
128
alt={"Terminals software"}
129
caption={
130
"Linux Terminals using vim, emacs, clang, mysql, cpp, maxim and zsh!"
131
}
132
wide
133
>
134
<Paragraph>
135
Many <strong>popular applications</strong> are included in CoCalc:{" "}
136
<A href="https://git-scm.com/">Git</A> to interact with{" "}
137
<A href="https://www.github.com">GitHub</A>,{" "}
138
<A href="https://www.vim.org/">VIM</A>,{" "}
139
<A href="https://www.gnu.org/software/emacs/">Emacs</A>, various
140
programming shells like <A href="https://ipython.org/">IPython</A>
141
, <A href="https://www.r-project.org/">R</A>,{" "}
142
<A href="https://www.gnu.org/software/octave/index">Octave</A> and{" "}
143
<A href="https://www.sagemath.org/">SageMath</A>.
144
</Paragraph>
145
<Paragraph>
146
There is also support for many programming languages and
147
compilers. <A href="/features/python">Python</A>, JAVA, C/C++ via{" "}
148
<A href="https://gcc.gnu.org/">GCC</A> and{" "}
149
<A href="https://clang.llvm.org/">Clang</A>,{" "}
150
<A href="https://ziglang.org/">Zig</A>,{" "}
151
<A href="https://en.wikipedia.org/wiki/Ada_(programming_language)">
152
Ada
153
</A>
154
,{" "}
155
<A href="https://en.wikipedia.org/wiki/Haskell_(programming_language)">
156
Haskell
157
</A>
158
, <A href="https://en.wikipedia.org/wiki/Smalltalk">Smalltalk</A>,{" "}
159
<A href="https://www.rust-lang.org/">Rust</A> and many more.
160
</Paragraph>
161
<Paragraph>
162
Look at our{" "}
163
<strong>
164
<A href="/software/executables">list of executables</A>
165
</strong>{" "}
166
to check what is available!{" "}
167
</Paragraph>
168
</Info>
169
170
<Snapshots />
171
172
<Comparison
173
name="terminal"
174
disclaimer
175
title={
176
<Title level={2} style={{ textAlign: "center" }}>
177
<Icon name="bolt" /> Terminals in CoCalc versus the competition
178
</Title>
179
}
180
/>
181
182
<SignIn startup={component} />
183
</Layout.Content>
184
<Footer />
185
</Layout>
186
</Customize>
187
);
188
}
189
190
export async function getServerSideProps(context) {
191
return await withCustomize({ context });
192
}
193
194