Getting to Know the Linux/Macox Terminal.



In this blog Im an going to go over the basic commands of a Unix based kernel. Whether you are working in a Linux terminal or a Macox, the commands are very compatible. Thats because both terminal are built on a Unix based kernel, unlike the  Windows command line which is DOS-based which is nowhere near compatible.Unix is a widely used  multiuser operating system built way back when sometime the 60’s, the Unix kernel is the power house behind a lot of the operating systems we use today(It is also most commonly used by programs also). Personally I love any Unix based terminal solely just on how functional and compatible it is to any applications   regarding programming languages.Also when learning a new programming language any time you need to bust out some commands a Bash scripting is greatly advised.

  Getting to know the commands

      Working with directories 

Important!! A directory is a folder.

~$ ls

“ls” tells the computer to list all directories in your current state.

~$ cd <somedir>

“cd” or Change Directory, changes from your current directory to the where you wish to switch from.

~$ mkdir <name of dir>

“mkdir” is short for Make Directory. What this does is it creates a directory with a name you wish to call that directory.

~$ rmdir <somedir>

“rmdir” or Remove Directory. This removes the directory. Note: The directory must be empty.

Working with files

~$ cp <file.html> <file2.html>

“cp” this command copies the file in the same directory. Make sure you rename the file you can not have two files named the same.

~$ mv <file.html> ./<some_directory>/

“mv” this command move a file to a different directory.

~$ rm <somefile>

“rm” this deletes a file.

Some extra commands

~$ history

List all the past commands.

~$ who

List all who is logged on.

~$ date

Prints out the current date.

~$ df

See how much free disk space.

~$ clear

Clears the terminal.

Great!! I hope this gives a basic knowledge of Unix based commands.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s