# 002
Excellent thank you so much, it works like a charm. How do I go about making this so I can run it from "anywhere" in the terminal? Linux 22.3 Zena for context
---
Easy! You just need to put the script somewhere on your `PATH`. The cleanest approach for personal scripts on Linux is `~/.local/bin`:
```bash
# 1. Create the directory if it doesn't exist
mkdir -p ~/.local/bin
# 2. Copy the script there
cp note-title.sh ~/.local/bin/note-title
# 3. Make sure it's executable
chmod +x ~/.local/bin/note-title
```
Note the lack of `.sh` extension in the destination — that's just convention for commands you run by name, totally optional but it means you type `note-title` instead of `note-title.sh`.
`~/.local/bin` is already on your `PATH` by default on most modern Ubuntu/Linux Mint systems, so you may be done. Test it:
```bash
which note-title
```
If that prints a path, you're all set and can run `note-title` from anywhere. If it prints nothing, you just need to add `~/.local/bin` to your PATH by adding this line to your `~/.bashrc` (or `~/.zshrc` if you use zsh):
```bash
export PATH="$HOME/.local/bin:$PATH"
```
Then reload it:
```bash
source ~/.bashrc
```
Given you're on Linux Mint 21.3 "Virginia", `~/.local/bin` should already be picked up automatically, so the `which` check will likely just work straight away.
---
for reference if I wanted to change the default characters for this would you only have to change this line?
```
MAX_CHARS="${2:-60}"
```
---
Yes, exactly — just change the `60` to whatever you want. For example for 80 characters:
```bash
MAX_CHARS="${2:-80}"
```
The `2` refers to the second argument you can pass on the command line, and the `:-60` part is the default that's used when no second argument is provided. So that one number is the only thing you'd need to change.
■