0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Ubuntu に主要言語をインストールする

Last updated at Posted at 2025-06-08

Ubuntu 24.04に主要言語をコマンドラインからインストールしたい
ついでにファイル拡張子、実行方法も覚えたい

言語一覧

  1. C
  2. C++
  3. Go
  4. Python
  5. Perl
  6. PHP
  7. Java
  8. Node.js
  9. Ruby
  10. rust
  11. lisp

インストール方法

1. C

sudo apt install gcc

拡張子 .c

実行方法

gcc ファイル名.c -o 実行ファイル
./実行ファイル

2. C++

sudo apt install g++

拡張子 .cpp

実行方法

g++ ファイル名.c -o 実行ファイル
./実行ファイル

3. Go

sudo apt install golang

拡張子 .go

実行方法

go ru ファイル名.go

4. Python

sudo apt install python3
sudo apt install python3-pip 

拡張子 .py

実行方法

python3 ファイル名.py

5. Perl

sudo apt install perl

拡張子 .perl

実行方法

perl .perl

6. PHP

sudo apt install php

拡張子 .php
実行方法

php ファイル名.php

7. Java

apt-cache search openjdk
sudo apt update
sudo apt install openjdk-17-jdk

拡張子 .java

実行方法

javac ファイル名.java
javac ファイル名

8. Node.js

sudo apt install node.js
sudo apt install npm

拡張子 .js

実行方法

node ファイル名.js

9. Ruby

sudo apt install ruby

拡張子 .rb

実行方法

ruby ファイル名.rb

10.rust

curl https://sh.rustup.rs -sSf | sh

拡張子 .rs

実行方法

rustc ファイル名.rs

11.lisp

sudo apt install sbcl

拡張子 .lisp

実行方法

sbcl --script ファイル名.lisp

Ubunut 24.04 で機能します
使い始めたら随時追加していきます.

~ Thank you for reading ~

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?