How to create symbolic links in Ubuntu 12.04 shell

Usage: ln -s <target> <link>

target = existing file or folder you wish to create a symbolic link of.
link = the new file/folder link to be created

For example, to create a link to /var/www/html/wordpress in my home folder:

Or:

Output:

 

How to check your hard drive space in Ubuntu 12.04 shell

Type the following command from your shell prompt:

Output:
The device mounted on / is the root folder of your file system.

If you want to see the file system types as well:

Output:

Enable (or disable) the mod_rewrite module on Apache2 web server on Ubuntu 12.04

Enable mod_rewrite module using ‘a2enmod’ (Apache2 Enable Module tool) with sudo permissions:

Output:
Then restart Apache to activate:

That’s it!

If you ever need to disable this module:

Disable mod_rewrite module using ‘a2dismod’ (Apache2 Disable Module tool) with sudo permissions to disable “rewrite”:

Output:
And then restart Apache to activate the changes:
 

Using ‘eyeD3’ to show/edit/copy MP3 ID3 tags in Ubuntu 12.04 shell

To install eyeD3:

Note: lowercase ‘d’ unlike the actual command.

To display ID3 info, use “eyeD3 <filename>”, surrounding the filename in quotes if it contains spaces:

Note: uppercase ‘D’ when using the command.

Output:

You can also display the ID3 info for multiple files at once, for example to see the ID3 tags for every file in a directory:

 

There’s lots you can do with eyeD3, including retagging, copying tags, removing tags, converting one tag format to another, etc.. here’s the full “eyeD3 –help” usage output:

 

How to customize your Icecast web server interface

Coming soon.

Change colours, insert your logo, add additional menu links, etc.

 

Customize folder display on Apache2 using .htaccess file on Ubuntu 12.04

Coming soon.

Using an .htaccess file to password protect an Apache folder in Ubuntu 12.04

Coming soon.

Batch re-encode MP3s and fix ID3 tags using ‘lame’ and ‘id3cp’ in Ubuntu 12 script.

Coming soon.

Give root privileges to a new user & safely disable the root account on Ubuntu 12.04

Log into your server as root.

Create a new user account for yourself.

You’ll be prompted to choose a password and enter user information:

Now let’s give the new user “james” root/sudo permissions. Type ‘visudo’ to edit the /etc/sudoers file:

Find the lines that look like this:

And add your new user underneath, following the same pattern as root:

Save the file:

Press Control-X
Press the letter Y
Hit enter.

Now log out as root, and log in with your new account.

Finally, disable the root account using the ‘sudo’ command:

Output:
Now any time you need to run something using root permissions, just prefix those commands with “sudo” using your new user/account:

For example:

You’ll be prompted to enter your password if you haven’t used sudo for a few minutes prior, after which the command will run:

Enjoy!

How to create a child theme in WordPress

Why do I need a child theme?

If you’ve modified any of your theme’s files directly, you’ll lose any changes you’ve made when your theme is updated. By using a child theme, you can override your theme’s settings without running the risk of losing your work.

[Read more…]