# How to Install Docker Desktop
- [ ] 1. Go to the Docker website: https://www.docker.com/products/docker-desktop/
- [ ] 2. Download and install Docker Desktop for your operating system.
# Updating Linux for WSL (Windows Subsystem for Linux)
- [ ] 1. Visit the Microsoft documentation: https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package
- [ ] 2. Follow the instructions to download and install the Linux kernel update package.
# Download Windows Terminal from Microsoft
1. Download it from the link below
https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-us&gl=us&ocid=pdpshare
# Installing Ubuntu
- [ ] Open PowerShell and run the following command:
```powershell
wsl --install -d Ubuntu
```
# Checking the Version of Ubuntu
- [ ] Open PowerShell and run the following command:
``` powershell
wsl -l -v
```

This will display a list of installed WSL distributions along with their version numbers.Look if you have a ubuntu installed
# Turning on the Ubuntu Switch in Docker Desktop
- [ ] 1. Open Docker Desktop.
- [ ] 2. Go to "Resources" and select "WSL Integration."
- [ ] 3. Find "Ubuntu 22.04.2" in the list and toggle the switch to enable it.
# Checking Docker Compose V2 Settings
- [ ] 1. Open Docker Desktop.
- [ ] 2. Go to the "General" tab.
- [ ] 3. Verify whether "Use Docker Compose V2" is turned on.
# Updating Ubuntu
- [ ] Run the following commands in the Ubuntu terminal:
```sql
sudo apt update
sudo apt upgrade -y
```
# Using Windows Terminal with Ubuntu
- [ ] 1. Open Windows Terminal.
- [ ] 2. Log in to Ubuntu
<-Choose Ubuntu here
and use the following command:
```arduino
curl -s "https://laravel.build/example-app?php=81" | bash
```
# Laravel Sail
- [ ] 1. Change the directory to the example-app:
```bash
cd example-app
```
- [ ] 2. Start Laravel Sail:
```bash
./vendor/bin/sail up
```
# Configuring the Settings File
- [ ] 1. Check whether you have bash or zsh
```
echo $SHELL
```
if its bash it would look like this
```
/bin/bash
```
in zsh
```
/bin/zsh
```
- [ ] 2. Open the settings file with the following command:
If bash
```bash
vi ~/.bashrc
```
if zsh
```bash
vi ~/.zshrc
```
- [ ] 3. Enter the insert mode by pressing the "I" key and use:
```bash
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
```
- [ ] 3. Escape the insert mode by pressing the "ESC" key and then write `:wq` to save and exit the file.
- [ ] 4. Update the settings file using this command:
If bash
```bash
source ~/.bashrc
```
if zsh
```zsh
source ~/.zshrc
```
# Checking Laravel
- [ ] After running Laravel Sail, open your web browser and enter `localhost` in the address bar. If everything is set up correctly, you should see the Laravel application running.
---
# Q and A
**Q:** When attempting to start Laravel Sail with "./vendor/bin/sail up," I'm getting "Command not found" error. What am I doing wrong?
> **A:** Troubleshooting "Command not found" Error with Laravel Sail
>
> If you encounter a "Command not found" error while trying to use the `./vendor/bin/sail up` command with Laravel Sail, there could be several reasons for this issue:
>
> 1. **Missing ./vendor/bin/sail file:**
> If the `./vendor/bin/sail` file is not present, you need to reinstall Laravel Sail.
>
> 2. **No execution permission for ./vendor/bin/sail file:**
> If the `./vendor/bin/sail` file lacks execution permissions, you can grant it by running the following command:
>
> ```
> chmod +x ./vendor/bin/sail
> ```
>
> 3. **Docker Desktop not installed:**
> Ensure that you have Docker Desktop installed on your system.
>
> 4. **Docker Desktop not running:**
> Make sure Docker Desktop is running and active.
>
> After checking these possible causes and resolving any issues, the "Command not found" error should be resolved. If the problem persists despite these checks, consider referring to the official Laravel Sail documentation for further assistance.
**Q:** How do I open PowerShell on my Windows computer?
> **A:** To open PowerShell, follow these steps:
>
>1. Press the "Windows" key on your keyboard to open the Start menu.
>2. Type "PowerShell" in the search bar.
> 3. Click on the "Windows PowerShell" app or "Windows PowerShell (Admin)" to open the regular or administrative PowerShell, respectively.
**Q:** What is Ubuntu Terminal?
> **A:** Ubuntu Terminal, also known as the Ubuntu command line or terminal emulator, is a text-based interface in the Ubuntu Linux operating system. It allows users to interact with the system using text commands rather than a graphical user interface (GUI). In Ubuntu, the default terminal emulator is called "gnome-terminal," which provides a powerful and flexible environment for running commands, managing files, and performing various system tasks through the command line interface. The terminal is an essential tool for developers, system administrators, and power users to perform a wide range of tasks efficiently.
---
---
# 日本語version****
# Docker Desktopのインストール方法
- [ ] 1. Dockerのウェブサイトにアクセス: https://www.docker.com/products/docker-desktop/
- [ ] 2.OSに合わせてDocker Desktopをダウンロードし、インストールします。
# Linux (WSL)のアップデート方法
- [ ] 1. Microsoftのドキュメントにアクセス: https://learn.microsoft.com/ja-jp/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package
- [ ] 2.指示に従ってLinuxカーネルのアップデートパッケージをダウンロードしてインストールします.
# MicrosoftからWindows Terminal をダウンロード
- [ ] 1. 以下のリンクを使ってダウンロードします
https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-us&gl=us&ocid=pdpshare
# Ubuntu をインストール
- [ ] PowerShellを開き、次のコマンドを実行します:
```powershell
wsl --install -d Ubuntu
```
# Ubuntuのバージョンを確認
- [ ] PowerShellを開き、次のコマンドを実行します:
``` powershell
wsl -l -v
```

これにより、インストールされているWSLディストリビューションとそのバージョン番号の一覧が表示されます。Ubuntuがあることを確認してください。
# Docker DesktopでUbuntuを有効化
- [ ] 1. Docker Desktopを開きます。
- [ ] 2."リソース"を選択し、"WSL統合"を選択します。
- [ ] 3.リストから"Ubuntu "を見つけてスイッチをオンにします。
# Docker Compose V2の設定を確認
- [ ] 1.Docker Desktopを開きます。
- [ ] 2. "全般"タブに移動します。
- [ ] 3."Docker Compose V2を使用する"の設定を確認します。
# Ubuntuのアップデート
- [ ] 1. Windows Terminalを開きます。
- [ ] 2. Ubuntuにログインし、
<-ここからUbuntu選べます。
次のコマンドを実行します:
```sql
sudo apt update
sudo apt upgrade -y
```
# Windows Terminalを使用してUbuntuにログイン
- [ ] 1. Windows Terminalを開きます。
- [ ] 2. Ubuntuにログインし、次のコマンドを実行します:
```arduino
curl -s "https://laravel.build/example-app?php=81" | bash
```
# Laravel Sail
- [ ] 1.ディレクトリをexample-appに変更します:
```bash
cd example-app
```
- [ ] 2.Laravel Sailを起動します:
```bash
./vendor/bin/sail up
```
# 設定ファイルの編集
- [ ] 1.bashまたはzshを確認してください
```
echo $SHELL
```
bashの場合は、以下のように表示されます
```
/bin/bash
```
zshの場合は、以下のように表示されます
```
/bin/zsh
```
- [ ] 2. 以下のコマンドで設定ファイルを開いてください:
bashの場合
```bash
vi ~/.bashrc
```
zshの場合
```bash
vi ~/.zshrc
```
- [ ] 2.挿入モードに入るために"I"キーを押し、次のように入力します:
```bash
alias sail='[ -f sail ] && bash sail || bash vendor/bin/sail'
```
- [ ] 3. 挿入モードを終了するには"ESC"キーを押し、ファイルを保存して終了するには`:wq`と入力します。
- [ ] 4. 設定ファイルを更新するために次のコマンドを実行します:
bashの場合
```bash
source ~/.bashrc
```
zshの場合
```bash
source ~/.zshrc
```
# Laravelの動作確認
- [ ] Laravel Sailを実行した後、ブラウザから、http://localhost にアクセスしてください。すべてが正しく設定されていれば、Laravelアプリケーションが表示されるはずです。
---
---
# Q and A
**Q**: "./vendor/bin/sail up"コマンドでLaravel Sailを起動しようとすると、「Command not found」エラーが表示されます。何が間違っているのでしょうか?
> **A**: Laravel Sailが正しくインストールされているか、Laravelプロジェクトが適切にセットアップされているかを再確認してください。
> 1. **./vendor/bin/sail ファイルが存在しない場合:**
> Laravel Sailを再インストールしてください。
>
> 2. **./vendor/bin/sail ファイルに実行権限がない場合:**
> 実行権限を付与するために、以下のコマンドを実行してください。
>
> ```
> chmod +x ./vendor/bin/sail
> ```
>
> 3. **Docker Desktopがインストールされていない場合:**
> Docker Desktopをインストールしてください。
>
> 4. **Docker Desktopが起動していない場合:**
> Docker Desktopを起動してください。
>
> これらの原因を確認しても問題が解決しない場合は、Laravel Sailの公式ドキュメントを参照してください。
>
>
**Q**: WindowsコンピューターでPowerShellを開く方法は?
> **A**: PowerShellを開くには、以下の手順に従ってください:
>
> 1. キーボードで「Windows」キーを押して、スタートメニューを開きます。
> 2. 検索バーに「PowerShell」と入力します。
>3. 「Windows PowerShell(管理者)」をクリックして、管理者権限を持つPowerShellを開きます。
**Q:** Ubuntu Terminalとは何ですか?
> **A:** Ubuntu Terminal(ウブントゥ ターミナル)は、Ubuntuのテキストベースのインターフェースです。このターミナルは、グラフィカルユーザーインターフェース(GUI)ではなく、テキストコマンドでシステムを操作する、コマンドラインインターフェース(CLI)です。Ubuntuでは、デフォルトのターミナルエミュレータは「gnome-terminal」と呼ばれ、CLI を通じてコマンドの実行、ファイルの管理、さまざまなシステムタスクの実行などができます。ターミナルは、開発者、システム管理者、パワーユーザーなどにとって、さまざまなタスクを効率的に実行するための重要なツールです。