Linux is an operating system used all over the world. Linux commands are also used on Mac, so I would like to summarize frequently used commands once.
cd Move the directory. (current directory)
% cd / => /(Root directory)Move to % cd => ~(Home directory)Move to % cd appfolder =>If there is a directory called appfolder in the current directory, move to appfolder % cd .. =>Parent directory(Directory one level above the current directory)Move to
pwd Show the current directory. (pringt working directory)
Example)When you're on your desktop % pwd => /Users/username/Desktop
mkdir Create a directory. (make directory)
Example)When you're on your desktop % mkdir newfolder =>A directory called newfolder is created on Desktop
touch Create a new file.
Example)When you're on your desktop % touch newfile =>A file called newfile is created on Desktop
ls List files and directories in the current directory
Example)When in the root directory % ls => Applications Systems Volumes cores...Omitted below
rm Delete files in the current directory
Example)When you are in Desktop and there is a file called newfile in Desktop % rm newfile =>Newfile on Desktop is deleted
rm -r Delete the directory in the current directory.
Example)When you are in Desktop and there is a directory called newfolder in Desktop % rm -r newfolder =>New folder on Desktop is removed
We hope that this post will help beginners review.