code • Terminal command lines (CLI) - martindubenet/wed-dev-design GitHub Wiki
[ Git apps ][ Git via Terminal (CLI) ][ Terminal command lines (CLI) ][ Setup Terminal shell ]
Command | Description | CLI example |
---|---|---|
pwd |
The full path to your home directory | |
ls -la |
List all files from the repository (including hidden files) sorted by name | |
ls -d */ |
List all (sub)directories within the current path | |
&& |
« AND » : Combine two command on one line. | pwd && ls -la |
touch |
Creating a new file. This command has its own subset of commands to edit a file | touch NewFile.txt |
mkdir |
« Make Directory » : Creating a new folder. | mkdir NewFolder |
mv |
« Move » one or multiple files or folders. Allowing to rename at the same time. | mv ~/Desktop/NewFile.txt /Volumes/USB Drive/AnyFolder |
~/ |
Root of the active user | cd ~/Sites/ |
cd |
« Change Directory » : Moving to a different driver or folder. | Win: cd /c/ Mac: cd /Volumes/Macintosh HD/
|
echo "String" >> file.txt |
Adds the « String » as content within the file | echo "# Hello World >> example.md |
⌃Ctrl+L | Clear the terminal viewport. | |
⌃Ctrl+Z | Stops the running command. | |
⌃Ctrl+X | Stops the running command. | |
⌃Ctrl+C | () Stops the running .sh command. |
OS | Description | CLI example |
---|---|---|
macOS | On Linux OS the term « Volumes » refers to « Drives » for Windows, as a disk on the computer. | cd /Volumes/usbT7r/Projects/www/ |
Windows | Windows requires to do it in two steps; First declare on what Drive, then where on that Drive. | cd c: && cd /c/wamp64/www/ |
Command | Description |
---|---|
echo $SHELL |
Know what shell is active |
chsh -s /bin/bash |
Switch to Bash terminal shell |
chsh -s /bin/zsh |
Switch to Zsh terminal shell |
which zsh |
Validate that you have Zsh intalled |
(1) Make a new folder, (2) move to that new folder, (3) create a new file in it.
mkdir NewFolder && cd NewFolder && touch NewFile.txt
Move to WAMP document root repository on Windows PC
cd c: && cd /c/wamp64/www/