Debian / Ubuntu Differences
This chapter focuses on Fedora / CentOS / RedHat for simplicity of explanation. Whenever there is a difference in the required commands for Debian / Ubuntu variations of Linux it will be noted.
The universal difference is that the commands shown are done by the Fedora / CentOS / RedHat root user. With Debian / Ubuntu you will either have to become root using the "sudo su –" command or you can temporarily increase your privilege level to root using the "sudo <command>" command.
Here is an example of how to permanently become root:
user@ubuntu:~$ sudo su -[sudo] password for peter:root@ubuntu:~#
Here is an example of how to temporarily become root to run a specific command. The first attempt to get a directory listing fails due to insufficient privileges. The second attempt succeeds when the sudo keyword is inserted before the command.
user@ubuntu:~$ ls -l /var/lib/mysql/mysqlls: cannot access /var/lib/mysql/mysql: Permission denieduser@ubuntu:~$ sudo ls -l /var/lib/mysql/mysql[sudo] password for peter:total 964-rw-rw---- 1 mysql mysql 8820 2010-12-19 23:09 columns_priv.frm-rw-rw---- 1 mysql mysql 0 2010-12-19 23:09 columns_priv.MYD-rw-rw---- 1 mysql mysql 4096 2010-12-19 23:09 columns_priv.MYI-rw-rw---- 1 mysql mysql 9582 2010-12-19 23:09 db.frm.........user@ubuntu:~$
Now that you have got this straight, let's continue with the discussion.