Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a43bbe

Browse files
committed
Merge pull request raspberrypi#34 from dan-c-underwood/master
A few more grammar fixes
2 parents ba5fa70 + 23b4935 commit 5a43bbe

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

usage/terminal.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Terminal
22

3-
The terminal (or 'command-line') on a computer allows a user a great deal of control over their system (or in this case, Pi!). Users of Windows may already have come across `Command Prompt` or `Powershell` and Mac OS users may be familiar with `Terminal`. All of these tools allow a user to directly manipulate their system through the use of commands. These commands can be chained together and/or combined together into complex scripts that can be potentially more efficient at completing tasks than much larger traditional software packages.
3+
The terminal (or 'command-line') on a computer allows a user a great deal of control over their system (or in this case, Pi!). Users of Windows may already have come across `Command Prompt` or `Powershell` and Mac OS users may be familiar with `Terminal`. All of these tools allow a user to directly manipulate their system through the use of commands. These commands can be chained together and/or combined together into complex scripts that can potentially complete tasks more efficiently than much larger traditional software packages.
44

55
## Starting LXTerminal
66

@@ -12,17 +12,17 @@ You should be able to see a line saying something similar to:
1212

1313
`pi@raspberrypi ~ $`
1414

15-
However this may vary for you, in this example `pi` is the name of the currently logged in user and `raspberrypi` is the 'hostname' of the Pi (so if your user name was Fred and the hostname was `fredsraspberry` then it would be `fred@fredsraspberry`).
15+
However this may vary for you. In this example `pi` is the name of the currently logged in user and `raspberrypi` is the 'hostname' of the Pi (so if your user name was Fred and the hostname was `fredsraspberry` then it would be `fred@fredsraspberry`).
1616

17-
Now, let's try running a command. Type `pwd` followed by the `enter` key. This should display something along the lines of `\home\pi` (again this depends on your user name!). This command displays your 'present working directory' (hence `pwd`!).
17+
Now, let's try running a command. Type `pwd` followed by the `enter` key. This should display something like `\home\pi` (again this depends on your user name!). This command displays your 'present working directory' (hence `pwd`!).
1818

1919
## Navigating and browsing your Pi
2020

2121
One of the key aspects of using a terminal is being able to navigate your file system. Firstly, run the following command: `ls -la`. You should see something similar to:
2222

2323
![](images/lsresult.png)
2424

25-
The `ls` command lists the contents of the directory that you are currently in (your present working directory). The `-la` component of the command is what's known as a 'flag', these modify the command that's being run. In this case the `l` displays the contents of the directory in a list, showing data such as their sizes and when they were last edited, and the `a` displays all files, including those beginning with a . - known as 'dotfiles'. Dotfiles usually act as configuration files for software and as they are written in text, they can be modified by simply editing them.
25+
The `ls` command lists the contents of the directory that you are currently in (your present working directory). The `-la` component of the command is what's known as a 'flag'. Flags modify the command that's being run. In this case the `l` displays the contents of the directory in a list, showing data such as their sizes and when they were last edited, and the `a` displays all files, including those beginning with a `.`, known as 'dotfiles'. Dotfiles usually act as configuration files for software and as they are written in text, they can be modified by simply editing them.
2626

2727
In order to navigate to other directories the change directory command, `cd`, can be used. You can specify the directory that you want to go to by either the 'absolute' or the 'relative' path. So if you wanted to navigate to the `python_games` directory, you could either do `cd /home/pi/python_games` or just `cd python_games` (if you are currently in `/home/pi`). There are some special cases that may be useful: `~` acts as an alias for your home directory, so `~/python_games` is the same as `/home/pi/python_games`; `.` and `..` are aliases for the current directory and the parent directory respectively, e.g. if you were in `/home/pi/python_games`, `cd ..` would take you to `/home/pi`.
2828

@@ -40,7 +40,7 @@ do
4040
echo Raspberry Pi!
4141
done
4242
```
43-
Now, save this with the name `fun-script`. Before you can run it you must first make it executable, this can be done by using the change mode command `chmod`. Each file and directory has it's own set of permissions that dictate what a user can and can't do to it. In this case, by running the command `chmod +x fun-script`, the file `fun-script` will now be executable. You can then run it by typing `./fun-script` (assuming that it is in your current directory). This script infinitely loops and prints `Raspberry Pi!`, in order to stop it press `ctrl-C`, this kills any command that's currently being run in the terminal.
43+
Now, save this with the name `fun-script`. Before you can run it you must first make it executable, this can be done by using the change mode command `chmod`. Each file and directory has its own set of permissions that dictate what a user can and can't do to it. In this case, by running the command `chmod +x fun-script`, the file `fun-script` will now be executable. You can then run it by typing `./fun-script` (assuming that it is in your current directory). This script infinitely loops and prints `Raspberry Pi!`, in order to stop it press `ctrl-C`, this kills any command that's currently being run in the terminal.
4444

4545
## Sudo
4646

0 commit comments

Comments
 (0)