Helpful Linux Commands
Here is a list of helpful commands that should enhance your experience with the command line in Linux and WSL.
To find in which directory you currently are, use:
To list all the files and folders in your directory, use:
To navigate between directories use cd followed by the path or name of the directory you want to access. If you start typing a location that is present in your current directory, you can then use the TAB key to autocomplete the name of a directory.
To go up one directory, use:
To go back to the root (/home/<user>), use:
To delete a file, use:
To delete a directory, use:
rm -r <directoryname>
Now that you have run multiple commands, and that you will be launching Empirica apps, there are a few useful tricks you should know:
- Use ctrl+l to clear your command line.
- Use ctrl+c to cancel (whilst writing it) or interrupt (when it is running) a command.
If you correctly installed WSL 2, you can view, access, and modify the files and folders in your WSL directly from your explorer. To open up the WSL in your explorer use:
Nevertheless, you will also need to get accustomed to using the command line to navigate in, and use, the the files and folders in your WSL directory. Here are some useful commands.
Head over to our Code Editors advice page to find out how to use our recommended code editor with Windows WSL: