# Useful Commands

## The which command

This command is used to find out which version of a program is being accessed by the node.  This is very useful if you have multiple versions of a program in your system like when you have just performed an upgrade.

Syntax:

```
which cardano-cli
```

This command will show the full path of the cardano-cli that is being used by the node.

## The find command

This command is useful when looking for where a particular file is located. &#x20;

Syntax:  Search for the file "filename' from the root directory '/' and return the full path if the file is located

```
find / -name 'filename' -print
```

Syntax:  Search from the current directory, all files ending in ".sh" and display the full path to these files

```
find . -name '*.sh' -print
```

## The netstat command

This command can show various network related outputs depending on the parameters that you pass to it.

Syntax:  To show configured network routes

```
netstat -rn
```

Syntax:  To display which IP address port 12788 is listening in

```
netstat -ln | grep 12788
```

## The htop command

This command will show you a dashboard of CPU, Memory and process utilization which is updated in realtime.

Syntax:

```
htop
```

NOTE:  A similar command "top" is also available with simpler output

## The umount command

This command is used to unmount filesystems.  You should use this command before removing a USB drive from the server.

Syntax:  Unmount the USB drive connected to the system

```
umount /media/cardano
```

NOTE:  Go to a different directory tree from the mount point or this command may fail.
