Ubuntu

Most useful commands for Linux

* Continuously check Apache error log file: $ tail -f /var/log/httpd/error_log * View first 15 lines from MySQL log: $ head -15 /var/log/mysqld.log * vi keyboard shortcuts => jump to end of line $ => start of line 0 => Delete rest of line D => Repeat the last command given: . (dot) => add [...]

Backup MySQL Database to a file

Backing up your database is a very important system administration task, and should generally be run from a cron job at scheduled intervals. We will use the mysqldump utility included with mysql to dump the contents of the database to a text file that can be easily re-imported. Syntax: mysqldump -h localhost -u root -pmypassword [...]

Tags : , ,

A “live” view of a logfile on Linux

This approach works for any linux operating system, including Ubuntu, and is probably most often used in conjunction with web development work. tail -f /path/thefile.log This will give you a scrolling view of the logfile. As new lines are added to the end, they will show up in your console screen. For Ruby on Rails, [...]

Tags : , ,

Check processes not run by you

ps aux | grep -v `whoami` List the top ten “wasters” ps aux –sort=-%cpu | grep -m 11 -v `whoami`

Recover root password

Step 1: For Redhat based distros: Boot from your first install CD and as the very first screen comes up hit F2 and type: rescue ( For RedHat “linux rescue” ) and the computer will boot in rescue mode. It will show a few alternatives, select : ¨mount the existing partitions¨ and go to the shell/console [...]

Access Your MySQL Server Remotely Over SSH

So you’ve got MySQL on your web server, but it’s only opened to local ports by default for security reasons. If you want to access your database from a client tool like the MySQL Query Browser, normally you’d have to open up access from your local IP address… but that’s not nearly as secure. So instead, we’ll [...]

Tags : , ,

How to check installed software in debian based linux (ubuntu)

Who remembers what has installed in his Ubuntu box? Here is the simple command: dpkg –get-selections > installed-software more installed-software What can you do in a fresh Ubuntu installation that you do not remember what software you need? dpkg –set-selections < installed-software and after that dselect All set in your fresh debian based linux. Debian [...]

Tags : , , , , , ,

How to fix X settings in Ubuntu

Choose from grub to start computer in “Recovery Mode” and in the next menu choose “Fix X” in order to reset system in the default X settings. It is that simple

Tags : , , , , ,

Shuttleworth: Ubuntu developer Canonical may need 3-5 more years of funding

Founder of unprofitable Linux vendor says he’s willing to continue bankrolling the company Canonical Ltd., the commercial backer of the Ubuntu Linux operating system, is not yet turning a profit, but founder Mark Shuttleworth said during a teleconference today that he is prepared to bankroll the company for three to five more years. “We continue to [...]

Tags : , , , ,