Change hostname in Ubuntu or Debian
If you’ve changed your mind about your Linux hostname or you’ve set to wrong hostname, here is how to fix it.
Firstly, I’ve tried the following command:
$sudo hostname mybrandnewname
But this will revert back to prior hostname whenever the machine reboots. So how can you change it permanently? First you’ll need to edit /etc/hostname file
$sudo vi /etc/hostname Then delete the old name and type whatevername you desire
It is also advisable to change new hostname in /etc/hosts file
Source : UbuntuManual
How to add new user and grant permission?
Once you’ve got your new favourite Linux distro installed, you’ll need to add users and grant permission as per your organization requirement.
The steps are very simple and straightforward.
sudo adduser
If you want to grant a user to all permissions as root, you should add that user to admin group. For example :
sudo adduser jason admin
Make sure the line “%admin ALL=(ALL) ALL” is present in the /etc/sudoers. The below is the screenshot of sample config file.
After that you might want to set specific password for the new user. You can do this by using the following command:
sudo passwd
Source : AskUbuntu
How to config ubuntu/debian to boot in text mode
I like Linux boxes to boot directly to terminal mode. If you’ve just moved to Ubuntu distro from Red Hat/ Fedora, you’ll think about changing the inittab. Well, bad news is in Debain or any of its derivatives, runlevels 2 to 5 are the same multi-user with display GUI. So if you type, sudo init 3, nothing will happen.
So here is how I make Ubuntu to boot into text mode by default. The requirement for this is you have to use grub as boot loader.
Just edit the /etc/default/grub using any of your favourite text editor, look for the line
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
Then changed it to
GRUB_CMDLINE_LINUX_DEFAULT=”text”
The following is the screenshot for what my grub file looks like after the changes.
After that save the file and run sudo update-grub. That’s it. Starting from next reboot, your ubuntu/debian variants will start in text mode.
Source : UbuntuForums
Recent Posts
Recent Comments
- robost on How to install Vista bubble screen saver in Win XP
- Rick on Paint can create ico files
- Oliverdejohnson on Paint can create ico files
- Johnson Jones on Paint can create ico files
- Hussain on How to install fonts without admin right
Tags
Archives
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- November 2009
- July 2009
- May 2009
- April 2009
- January 2009
- October 2008
- September 2008
- August 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- November 2006
- February 2006
- January 2006
- December 2005

