Ubuntu un-tar/extract tar ball/file to another directory

January 4, 2015

To extract an archive to a directory different from the current, use the -C, or –directory, tar option, as in: tar -xf archive.tar -C /target/directory

Linux Ubuntu move file from one directory to another directory command

November 26, 2014

In Linux, type: To move file mv somefile /anotherfolder/ To move all folder content: mv /somefolder/* /anotherfolder/* In Ubuntu, type: To move file sudo mv somefile /anotherfolder/ To move all folder content: sudo mv /somefolder/* /anotherfolder/* There’s almost always more than way to do something in Linux. And more importantly, there are almost always caveats. […]

Ubuntu user management command line

November 14, 2014

Change user password To change self password #passwd To change other user password #passwd username Removes the user’s home directory as well as deleting the user #sudo userdel -r [username] Add new user: #sudo adduser <username> Add user to admin #sudo adduser <username> admin Add user to sudoer #visudo Switch user sudo <username>

Ubuntu install PHPMyAdmin

September 18, 2014

  Type the following line in terminal: #sudo apt-get install phpmyadmin Package configuration – when asked which web server to use, select apache or lighthttpd – When asked “Configure database for phpmyadmin with dbconfig-common”? Choose “Yes” – Next key in “Password of the database’s administrative user:”. This is password for MySQL that you set during […]

Linux how to exit man page

September 18, 2014

After finished reading a man page manual, press “q” on your keyboard to quite or exit the page. Linux manual pages can be easily accessed via the terminal by typing man program-name. Manual or info page navigation can be accomplished by using the up and down arrow keys or in some cases, by pressing enter for more Once your finished viewing a […]

Ubuntu check PHP and mysql version

April 7, 2014

From command line: php -v mysql -V or php -i | grep -i ‘^libxml’

How to delete GIT branch both in local and remote?

December 16, 2013

To delete local branch $ git branch -d your_local_branch To delete remote branch $ git push origin :your_remote_branch or $ git push origin –delete “branchName” Deleting remote branch normally done after you or your collaborators are finished with and have merged it into master branch. However deleting local branch maybe due to testing or wrong […]

How to change the SSH Key on a running EC2 instance?

November 22, 2011

How to change the SSH Key on a running EC2 instance? Background Information Is it possible to change the SSH Key on a running EC2 instance? If so, how? Answer For various security reasons it can be a good idea to change ssh keys. Amazon doesn’t actually let you change keys for a live instance. […]