command line

Home command line

Ubuntu Missing add-apt-repository command

Problem: apt-get-repository Command is Missing I was trying to install the latest version of git from the Ubuntu Git Maintainers Team and I needed to add a Personal Package Archive (PPA) to the Software Sources. But when I tried to

Upgrading Ubuntu to Use the Latest Git Version

Problem: Ubuntu Won’t Upgrade to the Latest Git Version I was running script that clone some git archives from GitHub and I got the following error: But when I tried to upgrade git, Ubuntu told me I already had the

How to keep the existing file attributes (owner, timestamp, etc) when copying files or...

When copying files and especially directories, sometimes you want to keep the existing file attributes. For example, you may likely want to keep the same owner, group, timestamp, etc. You can keep the attributes by using the preserve argument. preserve=all

Setup WordPress or WPMU to make an atomic version switch — AND allow you...

I have a new WordPress MU (WPMU) install and I am ready for my first upgrade. I couldn’t get automatic upgrade to work, and all the forums said: do it by hand manually. This is fine, but I didn’t want

How to change your password from the command line

To change your own password from the command line: To change the password for another user, you must use sudo: Related posts: Newbie: how to edit a file from the command line Could there be any more basic question? We

How to Check the Ubuntu Version.

How do you know which version of Ubuntu you are running? This will return something like this: Related posts: Setup WordPress or WPMU to make an atomic version switch — AND allow you to revert I have a new WordPress

How to Move or Copy a Directory

I was trying to copy a directory, and I kept getting a cryptic error: cp: omitting directory `/var/log' The copy (cp) command only works for files. To copy a directory, you need to use the -r recursive flag: In this

How to Rename a File or Directory

There is no rename function in Ubuntu Linux. Instead, you simply move the file, giving it a new name. If you don’t actually mv it to another directory, then you have effectively renamed it: If you are trying to rename

How to view the current time from the command line

To see the current time from the Ubuntu or Linux command line: date which will give you: Fri May 30 15:53:21 EDT 2008 To see how to include and format dates and times in your shell scripts, see this post:

Failed Ubuntu Apt-Get Upgrade Corrupts the Available File

I was upgrading Ubuntu packages with The upgrade failed with a segmentation fault. I tried again, but found I had a corrupted /var/lib/dpkg/available file. I first go this error: I edited the available file and fixed the problem. But then