How to convert from Ubuntu to Debian
This article will encompass a LOT of previous posts. This is NOT recommended for n00bs.
1. While you are downloading the Debian iso, it would be a good first step to backup /home/ and /etc/.
2. You can find simple rsync backup/restore scripts here.
3. Once the debian iso is downloaded, you should md5sum check it first. You can find the debian cd iso image checksums here.
4. Burn the iso (not copy to a cd – why this is NOT for n00bs) to a cd or dvd, depending on what you downloaded.
5. Installing from the DVD is quite different then Ubuntu. This is NOT a live cd, so you can’t experiment first.
The rest of this article will ass/u/me that you were able to install Debian sucessfully. Configuring Debian, requires some work!
1. The first thing that bit me in the buttocks (can we say that here?) – is rebranded software. You won’t find Firefox or Thunderbird. Instead you will find re-branded software. So icedove instead of Thunderbird, and IceWeasel instead of Firefox. Those are in the Debian Repositories. The problem with re-branded software, is that it is NOT upstream compatible. You can always choose to install the branded stuff (Firefox/Thunderbird) from the Mozilla site. If you need 64 bit Firefox or Thunderbird you can get find that here.
NOTE: the following code block assumes sudo (#3 below is fixed:)
As always anything with an octothorpe (#) is a comment and need not be coded.
sudo apt-get install icedove # get the re-branded thunderbird
sudo apt-get install iceweasel # get the re-branded firefox
2. The second thing is .profile so you will want to deal with that next.
3. Next, was how to easily do sudo in debian
By default – sudo does NOT work in Debian. And as you know, you get sort of used to using sudo in Ubuntu. There are some crazy ideas on how to fix this, but this is pretty easy and straight forward.
4. You probably need java run time
Guess what? That does NOT come pre-installed on Debian! You can easily add the java runtime environment (jre) for Debian.
5. if you need to restart the gdm in Debian, it’s gdm3 NOT gdm as in Ubuntu. So
sudo service gdm3 restart
6. By default, /usr/sbin is NOT in your path in Debian, but is in Ubuntu. How to fix? This was a little more complicated then I thought. But Joe had a neat fix! (so none of the system tasks are available – things like I dunno gparted, vsftpd, useradd, etc — are not accessible.)
By default, when Linux comes up, it executes /etc/profile. Within /etc/profile it sources /etc/profile.d/bashrc.local.sh
What do I mean by “sources?” Joe explains:
Executing a script is the normal way to do it. The script executes, then it exits, and it’s environment is gone forever.
When you source a script, you execute all the commands in the script and (it) remain(s) in the environment – keeping all changes made to same.
execute: /path/to/script.sh
source: source /path/to/script or more succinctly:
. /path/to/script
And that is what the following script does/ It uses a function called pathmunge to add the missing paths:
# /etc/bashrc.local.sh for Linux
#
# Local environment variables
#
export ORGANIZATION="Mirai Consulting"
#if [ $SHELL == '/bin/bash' ]; then
#
# Set prompt and aliases to something useful for an interactive shell
#
case "$-" in
*i*)
#
# Set prompt to something useful
#
case "$is" in
bash)
set -p
if test "$UID" = 0 ; then
PS1="u@h:w> "
else
tty=`tty`
PS1=`uname -n`': $PWD n(tty${tty#/dev/tty}): bash: ! > '
fi
;;
esac
case $TERM in
xterm)
PROMPT_COMMAND='echo -ne "�33]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}�07"'
;;
screen)
PROMPT_COMMAND='echo -ne "�33_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}�33\"'
;;
*)
PROMPT_COMMAND=''
;;
esac
# fix broken non-root path -
pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}
#
# Path manipulation
#
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
pathmunge $HOME/sbin
unset pathmunge
set histexpand
export HISTCONTROL=ignoredups
alias ltr='ls -latr'
alias ll='ls -laFL'
alias lll='ll | less'
alias cls=clear
alias f=finger
sudo=''
alias maillog='$sudo tail -20 /var/log/mail.log'
alias postlog='$sudo grep postfix /var/log/mail | tail -40'
alias poplog='$sudo grep pop3-login /var/log/mail | tail -40'
alias msgs='$sudo tail -20 /var/log/messages'
alias krnl='$sudo tail -20 /var/log/kernel'
alias cmo='ls -Lltr /var/spool/mail'
alias psu='ps -FHu'
alias mqt='mailq|tail'
alias dmesg='/bin/dmesg|tail -40'
/bin/rm -f ~/.project
set `date`
echo "" >> ~/.project
echo " $LOGNAME logged in on `hostname` $1 $2 $3 $4" >> ~/.project
echo "" >> ~/.project
esac
#[ -r /etc/dircolors.sh ] && . /etc/dircolors.sh
alias addkey="sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys"
#fi
7. If you have Skype you will probably need to fix that as well.
This is just a first cut draft on the differences I noted between Ubuntu and Debian.
Thanks always to Joe and Loni.
Related Articles
No user responded in this post