Basic UNIX commands

19h47

Jérémy Levron

Posted on September 12, 2017

Basic UNIX commands

Lately, I started learning commands lines. I mean, I used npm install or gulp, but no more.

So I started using commands lines and I have to say that I like it. A lot.

I wanted to share with you what I learned.

cd

The cd command is used to change the current directory.

cd stand for change directory

cd path/of/directory
Enter fullscreen mode Exit fullscreen mode

To move up by one directory you can hit cd .. Source

ls

The ls command list all files of a type other than directory, found in the current directory.

ls stand for list segments

ls
Enter fullscreen mode Exit fullscreen mode

man

The man command display the online manual pages. We can specify a section as parameter. The section is normally the command, function or file name.

man stand for manual.

man name_of_command
Enter fullscreen mode Exit fullscreen mode

To exit the manual you can hit q, :q, Q, :Q or ZZ.

mkdir

The mkdir command is used to create a new directory. The directory would be create in the current directory.

mkdir stand for make directories.

mkdir name_of_directory
Enter fullscreen mode Exit fullscreen mode

rmdir

The rmdir command is used to remove an empty directory.

rmdir stand for remove directories.

rmdir name_of_directory
Enter fullscreen mode Exit fullscreen mode

We can pass an -p option. In this case each directory argument will be treated as a single path and will be removed if they are empty.

rmdir -p name/of/directory
Enter fullscreen mode Exit fullscreen mode

mv

The mv command is used to move a file into a given directory.

mv stand for move.

mv name_of_file name/of/directory/destination/
Enter fullscreen mode Exit fullscreen mode

open

The open command is used to open a file or a directory

open name_of_file
Enter fullscreen mode Exit fullscreen mode

I know, it's very basic, but you have to start somewhere. 😅

I created a Gist where I add what I learn.

And you, what are your favorite commands?

💖 💪 🙅 🚩
19h47
Jérémy Levron

Posted on September 12, 2017

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Basic UNIX commands
commandline Basic UNIX commands

September 12, 2017