1、如何修改ubuntu的计算机名
如果我们安装ubuntu时随便输入了一个主机名,安装完成后感觉不好又想修改,怎么办? 经过一番研究得到了修改的方法,其实很简单,只要打开/etc/hostname和/etc/network文件修改里面的老的主机名为你的新的主机名就可以了
2、ubuntu 怎么修改@后面的那个名称?例如我的系统在终端显示的是:tgxblue@ubutun。我想修改ubuntu那个名称
@之后的那个是主机名
打开终端:
输入:sudo gedit /etc/hostname
删除已有的主机名,输入新的主机名保存。下载开机生效。
3、Ubuntu如何修改默认的用户名
1.分别执行以下命令修改文件内容,将各个文件中的原名称改为新名称,比如我将用户名user改为wnt,其它主机名和登陆界面显示的信息也可以更改。
nano /etc/passwd # 更改用户名、所属组名、主目录名
nano /etc/group # 更改组名,一定要将用户名加入sudo
nano /etc/shadow # 更改用户名
nano /etc/hosts # 更改主机名
nano /etc/hostname # 更改登录界面显示的信息
2.修改主目录即/home下的用户文件夹名字,执行命令:
mv /home/old/ /home/new/,其中old为原用户名,new为新用户名。比如我的old为user,new是wnt。
3.修改完后将根目录挂载为只读,执行命令:
mount -o remount, ro /。因为刚开始进入recovery模式时是修改为了读写模式,为了安全起见最好改回来。完事后reboot重启,正常开机即可。
4、Ubuntu系统如何快速修改主机名?
1、快速查看主机名
在Ubuntu系统中,快速查看主机名有两种方法:一是打开一个GNOME终端窗口,在命令提示符中可以看到主机名,主机名通常位于@符号后;二是在终端窗口中输入命令:hostname或uname –n,均可以查看到当前主机名。
2、临时修改主机名
修改主机名最为快速的方法就是使用命令hostname 新主机名来改变当前主机名,其中新主机名可以用任何合法字符串来表示。不过采用这种方式,新主机名并不保存在系统中,重启系统后主机名将恢复为原先的主机名称。
3、永久修改主机名
在Ubuntu系统中永久修改主机名也比较简单。主机名存放在/etc/hostname文件中,修改主机名时,编辑hostname文件,在文件中输入新的主机名并保存该文件即可。重启系统后,参照上面介绍的快速查看主机名的办法来确认主机名有没有修改成功。
值得指出的是,在其他Linux发行版中,并非都存在/etc/hostname文件。如Fedora发行版将主机名存放在/etc/sysconfig/network文件中。所以,修改主机名时应注意区分是哪种Linux发行版。
5、Linux 服务器如何修改主机名
1,通过修改文件/etc/sysconfig/network . eg:
# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=Server34 ---->修改想要的名字
2,修改文件/etc/hosts
127.0.0.1 localhost Server34 localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
3,reboot 既可修改原主机名。
(二)CentOS7.2修改主机名
CentOS7.2修改主机名相对于6.5版本又有所改进,不需要重启就可以直接修改,具体的方法有如下三种:
(1)修改配置文件/etc/hostname来进行修改
[root@localhost ~]# vim /etc/hostname server23[root@localhost ~]# systemctl restart systemd-hostnamed.service[root@localhost ~]# hostnameserver23
(2)通过nmtui修改主机名
[root@localhost ~]# nmtui ┌─────────────────┤ Set Hostname ├──────────────────┐ │ │ │ Hostname Server23________________________________ │ │ │ │ <Cancel> <OK> │ │ │ └───────────────────────────────────────────────────┘ [root@localhost ~]# hostnameServer23
(3) hostnamectl的命令行工具
123456789101112131415161718192021222324252627282930313233[root@localhost ~]# hostnamectl -helphostnamectl [OPTIONS...] COMMAND ...Query or change system hostname. -h --help Show this help --version Show package version --no-ask-password Do not prompt for password -H --host=[USER@]HOST Operate on remote host -M --machine=CONTAINER Operate on local container --transient Only set transient hostname --static Only set static hostname --pretty Only set pretty hostnameCommands: status Show current hostname settings set-hostname NAME Set system hostname set-icon-name NAME Set icon name for host set-chassis NAME Set chassis type for host set-deployment NAME Set deployment environment for host set-location NAME Set location for host[root@localhost ~]# hostnamectl status Static hostname: Server23 Icon name: computer-vm Chassis: vm Machine ID: Boot ID: Virtualization: microsoft Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-327.el7.x86_64 Architecture: x86-64[root@localhost ~]# hostnamectl set-hostname servers23[root@localhost ~]# hostnameservers23
6、如何在ubuntu下更改主机名/更改ubuntu电脑名
如果我们安装ubuntu时随便输入了一个主机名,安装完成后感觉不好又想修改,怎么办?
经过一番研究得到了修改的方法,其实很简单,只要打开/etc/hostname和/etc/network文件修改里面的老的主机名为你的新的主机名就可以了!
在Terminal下输入:
gedit /etc/hostname (Root权限环境下)
sudo gedit /etc/hostname (非Root权限环境下)
更改相应的Host名,保存退出!因为是在x-window下修改的,所以需要注销一下,重新登陆即生效!
如果是在字符界面用
vi /etc/hostname
然后在Terminal下执行hostname命令看看改动是否生效了!(当然文中所说的修改默认都是root权限之下)。hostname命令不带任何参数默认是用来显示主机名的,如果在该命令的后面加上一个字符串,那么这个字符串就是新设置的主机名,但是这样的主机名系统没有记录,在下次登陆时还是老的主机名。
7、如何修改主机名
登录服务器后, 使用以下命令查看主机名hostname -f以Linode的VPS主机产品为例, 你会看到类似以下的信息:li123-45.members.linode.com如果你不在意这些, 可以跳过这篇文章. 这里以Debian/Ubuntu操作系统为例1. 配置/etc/hostname通过以下命令修改主机名echo "myhostname" /etc/hostnamehostname -F /etc/hostname2. 配置/etc/default/dhcpcd如果配置文件/etc/default/dhcpcd存在, 将这个文件内的这段内容注释掉#SET_HOSTNAME='yes'3. 配置/etc/hosts将"myhostname"替换成你的主机名, "mydomain.com"替换成你服务器的域名, "123.123.12.12"替换为你服务器的IP地址127.0.0.1 localhost.localdomain localhost123.123.12.12 myhostname.mydomain.com myhostname4. 重启networking服务5. 测试结果hostnamehostname -f
8、ubuntu下如何设置主机名
终端 hostname 查看主机名
主机名存放在/etc/hostname中 ,sudo gedit /etc/hostname 修改后保存
/etc/hosts 还有一份 , sudo gedit /etc/hosts 修改保存 重启即可
9、怎么把ubuntu改成其他系统名字
修改个系统名字算个毛。。。为啥不来个全套copy?
http://www.noobslab.com/2014/04/macbuntu-1404-pack-is-released.html
What's in this Version?
Themes are shiny, smooth, and fast
Mac Boot Splash auto configuration
Mac theme for LightDM auto configuration
Four GTK Themes
Three Icon Sets
>> Video Instructions are here
Mac wallpapers
Download Mac OS X Wallpapers
2. Docky
From last MacBuntu pack I recommended docky because cairo-dock were having issues with power-menu. It is light-weight and works without any problem.
First of all install docky with following command then install Mac theme for docky:
Terminal Commands:
sudo add-apt-repository ppa:docky-core/ppa
sudo apt-get update
sudo apt-get install docky
Download Mac theme for docky and follow the screenshot for theme setup.
Tip: To pin application to dock just open Application and right click on app icon then select 'Pin to dock'.
3: Mac OS X Lion Theme, Icons and cursors:
This pack offers four themes and three icon sets, enter these commands in terminal to get themes, icons and cursors.
Terminal Commands:
sudo add-apt-repository ppa:noobslab/themes
sudo apt-get update
sudo apt-get install mac-ithemes-v3
sudo apt-get install mac-icons-v3
After installation choose theme, icons and mac cursor from tweak tool.
To Uninstall themes, icons and cursors
Terminal Commands:
cd /usr/share/icons/mac-cursors && sudo ./uninstall-mac-cursors.sh
sudo apt-get remove mac-ithemes-v3 mac-icons-v3
4: Apply MBuntu Splash:
Enter following commands to install splash:
Terminal Commands:
sudo add-apt-repository ppa:noobslab/themes
sudo apt-get update
sudo apt-get install mbuntu-bscreen-v3
If you don't like MBuntu Splash, You can get back Ubuntu splash:
Enter following command to remove splash:
Terminal Command:
sudo apt-get autoremove mbuntu-bscreen-v3
5: Install MacBuntu theme for LightDM:
Enter following commands to install Mac LightDM theme:
Terminal Commands:
sudo add-apt-repository ppa:noobslab/themes
sudo apt-get update
sudo apt-get install mbuntu-lightdm-v3
If you want to revert back, You can get back LightDM default look:
Enter following command to remove LightDM theme:
Terminal Command:
sudo apt-get remove mbuntu-lightdm-v3
6: Indicator Synapse (Alternative to Spotlight)
Indicator-Synapse is developed by elementary OS team and it does the same function like "Spotlight".
To install enter following commands in terminal:
Terminal Commands:
sudo add-apt-repository ppa:noobslab/apps
sudo apt-get update
sudo apt-get install indicator-synapse
7: Replace 'Ubuntu Desktop' text with 'Mac' on the Panel
Enter following commands to change 'Ubuntu Desktop' text on the panel:
Terminal Commands:
cd && wget -O Mac.po http://drive.noobslab.com/data/Mac-14.04/change-name-on-panel/mac.po
cd /usr/share/locale/en/LC_MESSAGES; sudo msgfmt -o unity.mo ~/Mac.po;rm ~/Mac.po;cd
Revert back to 'Ubuntu Desktop' text, enter following commands in the Terminal:
Terminal Commands:
cd && wget -O Ubuntu.po http://drive.noobslab.com/data/Mac-14.04/change-name-on-panel/ubuntu.po
cd /usr/share/locale/en/LC_MESSAGES; sudo msgfmt -o unity.mo ~/Ubuntu.po;rm ~/Ubuntu.po;cd
8: Replace Overlay Scroll-bars with Normal
Enter following command in terminal to disable overlay scrollbar:
Terminal Command:
gsettings set com.canonical.desktop.interface scrollbar-mode normal
If you want to get back overlay bar, enter following command:
Terminal Command:
gsettings reset com.canonical.desktop.interface scrollbar-mode
9: Remove White Dots and Ubuntu Logo from Lock Screen:
Ubuntu 14.04 got new lock screen, I already instructed theme for LightDM but this step is necessary if you are using unity lock screen.
Enter following commands in terminal to remove white dots and Ubuntu logo:
Terminal Commands:
sudo xhost +SI:localuser:lightdm
sudo su lightdm -s /bin/bash
gsettings set com.canonical.unity-greeter draw-grid false;exit
sudo mv /usr/share/unity-greeter/logo.png /usr/share/unity-greeter/logo.png.backup
If you want to revert back then use following commands.
Terminal Commands:
sudo xhost +SI:localuser:lightdm
sudo su lightdm -s /bin/bash
gsettings set com.canonical.unity-greeter draw-grid true;exit
sudo mv /usr/share/unity-greeter/logo.png.backup /usr/share/unity-greeter/logo.png
10: Apple Logo in Launcher
Enter following commands to install Apple Logo:
Terminal Commands:
wget -O launcher_bfb.png http://drive.noobslab.com/data/Mac-14.04/launcher-logo/apple/launcher_bfb.png
sudo mv launcher_bfb.png /usr/share/unity/icons/
If you want back Ubuntu logo enter following commands in terminal:
Terminal Commands:
wget -O launcher_bfb.png http://drive.noobslab.com/data/Mac-14.04/launcher-logo/ubuntu/launcher_bfb.png
sudo mv launcher_bfb.png /usr/share/unity/icons/
11: Auto-hide Unity Launcher:
You can hide unity launcher from Appearance -> Behavior and turn off.
12: Unity Tweak Tool to change Themes & Icons:
You can use these popular tools to change themes and icons in Ubuntu, Also you can change other settings from these tweak tools. You can also install Ubuntu Tweak.
Enter following command to install tweak tools.
Terminal Command:
sudo apt-get install unity-tweak-tool
13: Install Monochrome icons for Libreoffice:
Human icons are default in LibreOffice which kind of look weird with this transformation pack, to make LibreOffice more elegant with monochrome icons follow these instructions.
Enter following commands to install monochrome icons for libreoffice.
Terminal Command:
sudo apt-get install libreoffice-style-sifr
After installation go to LibreOffice menu select "Tools" > "Options" > "LibreOffice" > "View" and select "Sifr" under "Icon size and style". See following screenshots
14: (Optional) Mac fonts:
Last time I received request about Mac fonts, so this time I am including them with this pack. So here are fonts for you.
Terminal Commands:
wget -O mac-fonts.zip http://drive.noobslab.com/data/Mac-14.04/macfonts.zip
sudo unzip mac-fonts.zip -d /usr/share/fonts; rm mac-fonts.zip
sudo fc-cache -f -v
You can change fonts from Unity-Tweak-Tool, Gnome-Tweak-Tool or Ubuntu Tweak
That's it
10、如何修改ubuntu系统的电脑名
如果我们安装ubuntu时随便输入了一个主机名,安装完成后感觉不好又想修改,怎么办?
经过一番研究得到了修改的方法,其实很简单,只要打开/etc/hostname和/etc/network文件修改里面的老的主机名为你的新的主机名就可以了!
在Terminal下输入:
gedit /etc/hostname (Root权限环境下)
sudo gedit /etc/hostname (非Root权限环境下)
更改相应的Host名,保存退出!因为是在x-window下修改的,所以需要注销一下,重新登陆即生效!
如果是在字符界面用
vi /etc/hostname
然后在Terminal下执行hostname命令看看改动是否生效了!(当然文中所说的修改默认都是root权限之下)。hostname命令不带任何参数默认是用来显示主机名的,如果在该命令的后面加上一个字符串,那么这个字符串就是新设置的主机名,但是这样的主机名系统没有记录,在下次登陆时还是老的主机名。