terminal - IliaKobalia/QA-program GitHub Wiki
To open terminal on MacOS, find it in Launchpad or:
- Press
Command+Space
and type "terminal" - Select "terminal.app" and press
Enter
Terminal opens in your user directory - /Users/<username>
.
To see the full path name of your current directory, run:
pwd # 'pwd' is short for 'print working directory'
command by typing it in terminal and hitting enter.
To list all subdirectories and files in your current directory, run:
ls # 'ls' is short from 'list'
To open a Desktop
subdirectory, run cd
command:
cd Desktop # 'cd' is short from 'change directory'
To move back, run cd
command again and specify ..
as directory name:
cd .. # '..' is short for 'parent directory'
To get back to your home directory from anywhere, run:
cd ~ # '~' is short for 'user home directory'
List Hidden Files
MacOS hides files and directories that start with .
, for example ~/.ssh
.
To list all files, including hidden, run:
ls -a
To create a new directory named new-project
, run:
mkdir new-project
Check that new-project
directory is successfully created:
ls
Navigate to the new-project
directory:
cd new-project
Check the full path name of your current directory:
pwd