Friday, January 8, 2016

Week 16: Day 044 - Linux Essential Tools #1


Hello, today we will be talking about STDs. Not the kind you're thinking of, but what's called "Standard Output" and "Standard Input". I thought I should start this entry humorously, but continuing, there will be coverage on BASH and shells; the symbol STD will be vital.

First, the shell is the working environment for a Linux network admin. In the book the specific shell they talk about is the "bash" shell. The first thing they talk about are aliases. You type in the command "alias (newcommand)=(oldcommand)" and it will rename a command to whatever you want. This is useful when you want to rename a complicated command to a simpler one. Then there's echo, which is pretty self-explanatory. You type "echo (blah whatever)" then it will copy you like one of those parrots, when responding.

Next, let's learn about I/O redirection (uses STDs). An I/O redirection uses this key ">" and to create a new file with information from another one, you would put the name of the command which withholds information, like say "help", and then type that. Then you put ">" and directly after that write a random title for the text document. Once you do that, type "less (whatever the filename is)" and you will see that the data from the help command has copied over to the new document. If you only have one ">" then it will overwrite the document's contained information. If you have two or ">>" then it will simply add on the data to the selected document.

When navigating directories, if you want to reset it to the highest one, type "cd" and it will do as such. To verify that this works type "pwd". Then "ls" will show you the files in that directory. Also to find your history, just type "history" and it will show you your command history. If you type the shortcut of "ctrl-r" then it will look for a command which specifically contains those characters. Also when you look through your command history, there will be numbers to represent the command, and you can type !(number) and it will execute the command. Another short fact from the chapter is the convenience of having bash auto-complete your commands. You can do this by typing the first few characters of the command, then tabbing until your command shows up. The more characters you type, the faster you'll find the command on the account of uniqueness.

Today, I installed vim thanks to Marco's help. Then Marco tested me on how to get "wget" onto the system. I remembered correctly as I did "yum search wget" and found a match. Then I continued by typed "yum install wget" since there was only one available, and it installed it. This is the first time I succeeded it on my own! BY THE WAY, fun fact when reading a document and clicking "v" it will open the document in vim for you to edit. Marco didn't know this, I found out, out of curiosity.

In conclusion, I am not done with the chapter, but I think I'll dedicate time to learning just vim, since it will probably be important for the rest of the textbook. According to Marco and Mr. Elkner it's a very powerful tool, and I should dedicate time to it. Thanks for reading, and goodbye.

No comments:

Post a Comment