Assisting 11695529 developers since 2005.

Web Designer, Open Source, Loyal, Dad.  

Read More »

Linux: How to Disable the GUI in CentOS

Posted by David  •  Jul 8th, 2014 8:04:29 pm - Subscribe | Mood: good | Music: No music

This entry explains how to enable / disable to the graphical user interface (GUI) in CentOS by modifying the inittab file. If you are a hard code command line user disabling the GUI will give the added benefit of save resources, and we LOVE saving resources on our servers.

Begin by opening up the command line and doing the following. (I will assume you know how to open up the command line, but if not it can be found on your gnome, kdm, xdm dock.

Step 1: In the command line type:

vi /etc/inittab

Step 2: Now find the line that states:

Step 3:Now simply press i (to insert text, then change the id:5:initdefault: to the following:

Step 4: Once this is complete press the colon, and type wq! (This will commit the change.)

So what is going on here is that we are modifying the inittab file and telling CentOS to default the multiuser user mode. Doing so will now disable the GUI from CentOS, and now present to command line from now on.

As always if you have questions, leave a comment. happy.gif

Comments 0  •  Jul 8th, 2014 8:04:29 pm - Subscribe  •  Tweet this entry | Post a comment

Linux: How to Move All Content in One Directory to Another

Posted by David  •  Jul 7th, 2014 7:09:16 pm - Subscribe | Mood: happy |

This entry explains how to move all content from one directory to another directory with out copying the original directory itself.

Step 1: In this example I will begin by getting a file from the web. In the command prompt type:


Step 2: I will begin the extraction process, since the file is in a tar ball, we need to extract the contents. In the command prompt type:

tar -xf file.tar.gz

Step 3: Finally, we will move the extracted directories contents 'mydir' to the path that we wish the files to be moved to.

mv mydir/* /home/david/mynewdir

I know this is a 101 tip, but it never hurts to reflect on your command line beginnings. If you have questions leave a comment.

Comments 0  •  Jul 7th, 2014 7:09:16 pm - Subscribe  •  Tweet this entry | Post a comment

How to Rename File Extensions & Variables in Linux

Posted by David  •  Jun 16th, 2014 5:37:30 pm - Subscribe | Mood: good | Music: No Music

This entry explains how to rename files extensions & variables in Linux.

Currently I have a web server running CentOS. Recently I came across a ton of files in various directories with a file extension .html which needed to be renamed to .php. (I configured .htaccess to not be allowed on the server)

Rename File Extensions in Linux

Things you will need:
  • Terminal
  • Vi

    First you will need to do is open up terminal and navigate to the parent directory in which all of your files with the file extensions that you would like to change are located. Once at this location run the code that I have provided for you below. What this will do is find and rename all files with the extension .html to .php regardless of the name of the file. So you will be responsible for modifying my .html and .php to the extensions that suit your change.

    find . -depth -name "*.html" -exec sh -c 'mv "$1" "${1%.html}.php"' _ {} \;

    Now then, if you would like to specify the path and NOT have to navigate to the path, simply change the /var/www/html/mydir in the line below to the path with the files with the extensions that need to be renamed. Also be sure that you change my .html and .php to the extensions that suit you!

    find /var/www/html/mydir -depth -name "*.html" -exec sh -c 'mv "$1" "${1%.html}.php"' _ {} \;

    No need to contine below if this completes your needs:

    Now that we have all of our file extensions changed from .html to .php in the current directory and subdirectories all we need to do is rename the contents in our index.php formelly index.html. If we we're to view index.php in our browser we would have a bunch of links pointing to .html files, but since we renamed them the links now 404. sad.gif

    Well let's update those links! Open index.php (or whatever your index is) in vi, and enter the following:

    :%s/.html .php

    This will now update all .html extension to .php that are found inside of the file index.php. Keep in mind that many of you will not have to do this, and your renaming stopped after step one in this entry.

    Well, I hope this helped you with the pain staking task of renaming files on your linux machine. Yes, I do know that my instructions can be hard to follow if you are a beginner to the linux system. But when I have time, I promise to create a video that will demonstrate everything that I have explained above.

    As always if you have any questions leave a comment, I promise to assist you in any way I can.

    Comments 0  •  Jun 16th, 2014 5:37:30 pm - Subscribe  •  Tweet this entry | Post a comment

  • Mentioned in the Headlines on Daily Tech News Show

    Posted by David  •  Jun 5th, 2014 1:28:54 pm - Subscribe | Mood: happy | Music: No music

    Cool, I got mentioned on The Daily Tech News Show with Tom Merritt & Guests yesterday morning. Daily Tech News Show is a audio podcast that scour the web for the most important tech news to share with you.

    Video playback below. 1 min 52 sec:

    I submitted an article regarding Google releasing source code Tuesday for a Chrome extension called “End to End” that would provide OpenPGP encryption for messages within a browser.

    You can read more about the day's show at: DTNS 2249 – BUFFER BATTLES

    Comments 0  •  Jun 5th, 2014 1:28:54 pm - Subscribe  •  Tweet this entry | Post a comment

    CompTia Security+ Certified

    Posted by David  •  Jun 4th, 2014 8:50:24 pm - Subscribe | Mood: busy |

    Just an late update on my progression with my certifications.

    Security+ CE Certified

    Good afternoon everyone, sorry for not positing this sooner I know a few of you were wondering where I am at with my certifications so here's the update.

    As your already aware I became Network+ Certified back in January, and now I am Security+ Certified as of this past March. This was an elective certification for me, but I am glad I took it! Some thing's that I took out of it we're preventive measures from a network & server stand point which are invaluable for someone that is in my field.

    CompTia Security+ covered some of the following:

    1. Intrusion Prevention Systems (IPS)
    2. Intrusion Detection Systems (IDS)
    3. Kerbos & Radius Servers
    4. Subnetting
    5. 802.11x
    6. IPV4 / IPV6 / DNS
    7. Man in the Middle Attacks
    8. Input Validation
    9. LDAP Injections
    10. Secure Protocols & more!

    I took this exam because I felt that the knowledge I got from it would be invaluable for me as a sys admin level later down the line. With everything being cracked / hacked / spoofed / injected nowadays I would recommend studying and giving the exam a shot. My Network+ knowledge really helped in my success on it, but it is not required.

    Security+ Study resources I used:
    1. CompTIA Security+ Deluxe Study Guide Recommended Courseware: Exam SY0-301
    2. CompTia SY0-301 Security+ Terms & Definitions (excuse my mess)
    3. Darril Gibson's - Get Certified and Get Ahead (Must get, has practice tests!)
    4. Finally being a self taught student I also used (and continue to use) - CompTIA Security+ (SY0-301)

    Final thoughts:
    My recommendation is if you plan on taking the exam, get familiar on how questions are asked. Sometimes all the questions are right, but there is a better answer among them. Darril Gibson, well train you on this and will give you reasons why your answer is wrong. (Very helpful)

    Questions? Leave them below, I am happy to help. happy.gif

    Comments 0  •  Jun 4th, 2014 8:50:24 pm - Subscribe  •  Tweet this entry | Post a comment

    Image Gallery


    Amazon Wishlist Stumble Upon Toolbar
    Internet Blogs - Blog Top Sites Internet Blogs - Blog Top Sites Technology

    About Me


    iPhone: 29.513522,-98.565523 Web Designer, Open Source, Loyal, Dad. Learn more...