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” 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
List all the past commands.
List all who is logged on.
Prints out the current date.
See how much free disk space.
Clears the terminal.
Great!! I hope this gives a basic knowledge of Unix based commands.