Open In App
Related Articles

How to Install LISP on Linux?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

LISP (List programming) is the second-oldest high-level programming language after Fortran. It has a fully parenthesized prefix notation.

Installing LISP on Linux:

Follow the below steps to install LISP on Linux:

Step 1: Install SBCL compiler.

Steel Bank Common Lisp (SBCL) is the most common Lisp compiler. It is open-source and it provides a compiler, runtime, and an interactive environment including a debugger, a statistical profiler, a code coverage tool, and many other extensions.
Install it via the following command (Enter password when prompted):

sudo apt-get update
sudo apt-get -y install sbcl

For arch linux, you can use the following command:

sudo pacman --noconfirm -S sbcl
Installing SBCL compiler

Step 2: Now Install Quicklisp package manager

sudo apt-get -y install curl
curl -o /tmp/ql.lisp http://beta.quicklisp.org/quicklisp.lisp
sbcl --no-sysinit --no-userinit --load /tmp/ql.lisp \
       --eval '(quicklisp-quickstart:install :path "~/.quicklisp")' \
       --eval '(ql:add-to-init-file)' \
       --quit
https://media.geeksforgeeks.org/wp-content/uploads/20211005170231/part1.jpghttps://media.geeksforgeeks.org/wp-content/uploads/20211005170309/part2.jpg

Step 3: Now Install the text editor or IDE of your choice

You can use any text editor for editing lisp files. Some popular options are VS code, SLIME, EMACS, Vim, etc.

Suggested extensions for VS code:

Example:

Here we save the file as filename.lisp eg. test.lisp. 

Lisp

(write-line "Hello Geeksforgeeks")

                    


Navigate to the file location and run it using the command: 

sbcl --script filename.lisp
For example:
sbcl --script test.lisp

Output:

output

Last Updated : 16 Oct, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads