DEV Community

Tetsuya Kojima
Tetsuya Kojima

Posted on

Let's graduate GUI and Live in Terminal!!

Hello there:)
This is my first post!
This article can help a person who is a beginner.
Recently I live in iterm2 and I graduated GUI.
So if you haven't tried CUI, this article is really helping for you!
Let's get started!

Open the terminal

first, please type ⌘ + space, so you can use the Spotlight function and then type the word "terminal"
Can you see the black background application like this? It's the terminal that is CUI tool (I use iterm2 that's why the appearance is a little bit different but no problem!)
スクリーンショット 2020-11-14 12.23.01

cd

next type the word cd.
"cd" means change directory.
you can type cd directory name like this.

cd Desktop
Enter fullscreen mode Exit fullscreen mode

and then you can see like this.

~/Desktop
Enter fullscreen mode Exit fullscreen mode

this means you are on Desktop.

pwd

pwd means print working directory
just type pwd.

pwd
Enter fullscreen mode Exit fullscreen mode

you can see like this.

/Users/your name/Desktop
Enter fullscreen mode Exit fullscreen mode

if you confuse about where you are, you can type it.

mkdir

next, please type the word mkdir.
"mkdir" means make directory.
please type mkdir directory name like this.

mkdir sample_dir
Enter fullscreen mode Exit fullscreen mode

you could make a new directory!

ls

ls means list.
you can see a list of directories and files.
and you can check sample_dir is made like this.

sample_dir xxx.txt yyy.txt zzz
Enter fullscreen mode Exit fullscreen mode

(if many files appeared, please type clear.
your screen is to be clean.)

touch

touch means create a file.
(To be accurate, it update timestamp)
you can type like this

touch sample_file
Enter fullscreen mode Exit fullscreen mode

you made a file and then please type ls

sample_dir sample_file xxx yyy zzz
Enter fullscreen mode Exit fullscreen mode

mv

mv means to move.
you can move your file or directory.

mv sample_file sample_dir/
Enter fullscreen mode Exit fullscreen mode

this sentence means mv [files you want to move] [destination]

please type ls

sample_dir xxx yyy zzz
Enter fullscreen mode Exit fullscreen mode

and then please type cd sample_dir and ls.

you can see like this

sample_file
Enter fullscreen mode Exit fullscreen mode

you could move the sample_file below the sample_dir!

finally, you can type rm.
rm means remove but take care!
if you type this command, you can't be undone.
please type carefully.

rm sample_file
Enter fullscreen mode Exit fullscreen mode

and then type ls.
you can see nothing.

if you want to take a rest, please type exit.
you can close the terminal!

All right! this is a basic command of the unix system.
please practice and then let's graduate GUI!
Thank you for reading!
if you like this post, please smash the like button and share it!

Top comments (0)