Windows Terminal is a powerful tool that allows you to access the command line interface (CLI) in Windows. With Windows Terminal, you can open multiple tabs and run different commands simultaneously. In this article, we will learn how to start a new tab using the CLI and run a command with fish, a user-friendly shell.
Step 1: Install Windows Terminal
If you haven't installed Windows Terminal yet, you can download it from the Microsoft Store or from the official GitHub repository. Once downloaded, follow the installation instructions to set it up on your system.
Step 2: Open Windows Terminal
After installing Windows Terminal, you can open it by searching for "Windows Terminal" in the Start menu or by pressing the Windows key and typing "Windows Terminal."
Step 3: Create a New Tab
To start a new tab in Windows Terminal, you have multiple options:
- Press
Ctrl + Shift + Ton your keyboard. - Click on the "+" button in the tab bar at the top of the window.
- Right-click on an existing tab and select "New Tab" from the context menu.
Step 4: Select the Fish Shell
By default, Windows Terminal uses the PowerShell as the default shell. However, you can change the shell for each tab. To select the Fish shell, follow these steps:
- Click on the down arrow symbol (
▾) in the tab bar to open the dropdown menu. - Select "Settings" from the dropdown menu.
- In the settings file, locate the
"defaultProfile"property and set its value to the GUID of the Fish shell profile. - Save the settings file by pressing
Ctrl + Sor using the "File" menu and selecting "Save".
Step 5: Run a Command with Fish
Now that you have a new tab with the Fish shell, you can run commands using Fish. Here's how:
- Type your command directly in the terminal and press
Enterto execute it. - If you want to run a specific command with Fish, you can prefix it with
fish -c. For example, to list the files in the current directory, you can typefish -c "ls"and pressEnter.
Step 6: Customize Windows Terminal
Windows Terminal offers various customization options to personalize your experience. You can change the appearance, add new color schemes, customize key bindings, and much more. To customize Windows Terminal, follow these steps:
- Click on the down arrow symbol (
▾) in the tab bar to open the dropdown menu. - Select "Settings" from the dropdown menu.
- In the settings file, you can modify various properties to customize Windows Terminal. For example, you can change the color scheme by modifying the
"schemes"property. - Save the settings file by pressing
Ctrl + Sor using the "File" menu and selecting "Save".
That's it! You now know how to start a new tab using the CLI and run a command with Fish in Windows Terminal. Have fun exploring the power and flexibility of the command line interface!
References
| Reference | Link |
|---|---|
| Windows Terminal Official Documentation | https://docs.microsoft.com/en-us/windows/terminal/ |
| Windows Terminal GitHub Repository | https://github.com/microsoft/terminal |
| Fish Shell Official Documentation | https://fishshell.com/docs/ |