Clean-up Pacman
avatar

In Arch when ever you install a package it is downloaded to your system. This make perfect sense because how else are you going to install it… What most people don’t realize is that those packages stay on the system forever unless you purge them.

This can be nice sometimes, especially if you want to re-install a package which you previously removed.

Purging your packages once in a while will free up a lot of free space on your machine and it will help to keep your system clean. To purge the copies pacman keeps just run the following command and say yes to both questions:

pacman -Sc

Posted in Arch | Tagged , , | Leave a comment

Working with ISO from the Linux Command Line
avatar

If you have wondered how to create an iso from the command line, it is very simple.  You just need to use the following commands:

mkisofs -o <name of iso>.iso <directory to be iso>

To burn an ISO from the command-line many people do a DD, this doesn’t always work since it is technically not the correct way to do it.  To do it the proper way you would need to run the following commands:

  1. Determine the Device ID number by running the following command:

    cdrecord -scanbus

    * The device ID number will be x,x,x on the row which lists the CD/DVD drive you will be using.

  2. Next you will want to do the actual burning of the ISO to that device using the following command:

cdrecord -v dev=<Device ID from the scanbus command> <ISO to burn>.iso

Posted in Arch, CentOS, Fedora, Linux | Tagged , , | Leave a comment

Unlock An Account
avatar

To unlock a user in Linux is quite easy you just need to run the following command:

passwd -u <account>

This will unlock the account which has expired, but if you have turned on the advanced PAM Account Auditing you will also need to reset their account using the following command:

/sbin/pam_tally2 –user <account> –reset

This will reset the number of times they have incorrectly logged in so the account can be used again.

Posted in Arch, CentOS, Fedora, Linux | Tagged , | Leave a comment

Mounting folders through SSH
avatar

One of the first rules of security is to not have any ports open which you do not need to have open.  That is also pretty common sense.  One problem you run into though is you still need to access data from one machine on another.  Samba is generally used for file sharing but since it follows the windows standard for file sharing it announces your shares to anyone who asks.

If it is just you accessing your files you can actually mount a folder from another system using sshfs.  Sshfs is available in all of the major distro’s repositories so it should be easy to find.

The first step is to just create a folder which you want to use as a mount point.  Once you do that you just use the following command:

sshfs <user>@<machine>:/path/on/remote/system /local/path

After you do that your local folder will now display the contents of your remote folder.

If you want to allow other users to access the folder as well you need to add all_other as shown below.

sshfs -o allow_other,default_permissions

Posted in Arch, CentOS, Fedora, Guides, Linux | Tagged , , , , | Leave a comment

Clean Out Orphaned Packages in Arch
avatar

After using Arch for a while and installing and removing applications you are bound to accumulate orphaned packages… which are just packages that were install as dependencies  but now that the original program has been remove they are no longer needed.  An easy way to remove them automatically is to run the following command:

pacman -Rsn $(pacman -Qqdt)

This will do a query of orphan packages and then dump that right into the command to remove them.

Posted in Arch | Tagged , | Leave a comment