Terminal
Contents
Terminal#
¿Qué es?#
El terminal es una herramienta que nos permite interactuar con el sistema operativo a través de comandos. Estos comandos son similares a los que usamos en el lenguaje natural, pero en vez de palabras usamos comandos que el sistema operativo entiende.
¿Cómo abrir el terminal?#
Windows#
Presionar la tecla
Windows
+R
para abrir el cuadro de ejecución.Escribir
cmd
y presionarEnter
.
Mac#
Presionar
Command
+Espacio
para abrir Spotlight.Escribir
terminal
y presionarEnter
.
Probar Python desde el terminal#
Windows#
Abrir el terminal.
Escribir
python
y presionarEnter
.Escribir
print("Hola mundo")
y presionarEnter
.Escribir
exit()
y presionarEnter
para salir.
C:\Users\Usuario>python
Python 3.11.0 (tags/v3.11.0:1a79785, Oct 5 2021, 19:00:00) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hola mundo")
Hola mundo
>>> exit()
Cell In[1], line 1
C:\Users\Usuario>python
^
SyntaxError: unexpected character after line continuation character
Mac#
Abrir el terminal.
Escribir
python3
y presionarEnter
.Escribir
print("Hola mundo")
y presionarEnter
.Escribir
exit()
y presionarEnter
para salir.
$ python3
Python 3.11.0 (tags/v3.11.0:1a79785, Oct 5 2021, 19:00:00) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hola mundo")
Hola mundo
>>> exit()
Cell In[2], line 2
Python 3.11.0 (tags/v3.11.0:1a79785, Oct 5 2021, 19:00:00) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin
^
SyntaxError: invalid decimal literal