Skip to the content.

Command line

Basics

If this is you first time using the command prompt you might be interested by this section. The command prompt (often referred to as terminal in Linux world) is your interface to interact with the operating system and many available tools. To learn any useful scientific computing skills it is useful to get a grasp of its use because it is there that we will launch most applications. The illustrations below assume you are working under Windows, but the introductory commands are common to most operating systems.

Now let’s launch a terminal. If you are working under VS Code you can use the shortcut to display the terminal Ctrl+J; the bottom of your window should display something as

PS D:\Kompanion>

The start of this line displays you path in the system; depending on your configuration that could not be the case and you can ask the OS to give you that with pwd (print working directory)

PS D:\Kompanion> pwd

Path
----
D:\Kompanion

If you are invited to move to directory src you may which to use command change directory, or cd in the system’s language

PS D:\Kompanion> cd .\bin\
PS D:\Kompanion\bin> 

Now that you reached your destination, you might be interested at inspecting the contents of this directory, i.e. listing its contents; that is done with ls as follows

PS D:\Kompanion\bin> ls


    Directory: D:\Kompanion\bin


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         1/31/2025  11:11 AM                apps
d-----          2/3/2025   9:19 AM                data
d-----         1/30/2025   2:34 PM                downloads
d-----          2/3/2025  11:50 AM                pkgs
d-----         1/31/2025   9:33 AM                scripts
d-----         1/30/2025   9:58 AM                tests
-a----         1/31/2025   9:33 AM           2697 activate.bat
-a----         1/30/2025   9:58 AM            161 code.bat
-a----         1/30/2025   9:58 AM            132 kode.bat
-a----         1/30/2025   9:58 AM            131 kpip.bat

Oops! It was not the directory you wanted to go to! No problems, you can navigate one-level-upwards using the special symbol .. (two dots) and change directory again

PS D:\Kompanion\bin> cd ..\docs\
PS D:\Kompanion\docs> 

This is the minimum you need to know: navigate, know your address, inspect contents.