# basename — file name from a path

`basename` — file name from a path.

## Example

```bash
basename /home/user/file.txt
```

This site also runs the command in a browser terminal simulator, so the examples above
can be typed and executed without installing anything.

Source: https://zero2vibecode.com/commands/basename
