Linux & change username & computer name & .bashrc
Linux & change username & computer name
ubuntu change username and computer name
https://askubuntu.com/questions/817452/i-need-to-change-terminal-name
solution
https://www.ostechnix.com/hide-modify-usernamelocalhost-part-terminal/
# backup
$ cp ~/.bashrc ~/.bashrc.bak
~/.bashrc
/home/xgqfrms
$ cd ~/.
$ pwd
$ cat .bashrc
$ sudo vim .bashrc
# i
# Esc :wq
OK
computer name
https://askubuntu.com/questions/9540/how-do-i-change-the-computer-name
$ pwd
$ ls -al
$ whoami
$ cd ~/
$ cat hostname
$ vim hostname
# i
# Esc :wq
# Esc :wq!
# Esc :wqa!
# Esc :qa!
change username
https://askubuntu.com/questions/34074/how-do-i-change-my-username
$
.bashrc & rename hostname & rename username
$ pwd
$ cd ~
$ pwd
$ cat .bashrc
$ vim .bashrc
# sudo vim .bashrc
# i
# ESC + :wq!
macOS
todo...
xgqfrms@mbp2019
macOS terminal change hostname
https://www.howtogeek.com/tips/how-to-change-your-computer-name-on-mac-os-x/
- sharing
sudo scutil --set HostName [NewHostNameHere]
OK
Linux $PS1
PS1 (Prompt String 1)
$ echo $PS1
https://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html
https://www.linuxnix.com/linuxunix-shell-ps1-prompt-explained-in-detail/
https://linuxconfig.org/bash-prompt-basics
Linux 如何一次切换到 home 目录
相对路径 & 绝对路径
cd ./ 代表当前目录
cd ../ 代表上级目录
cd ~ 当前用户的根目录
cd / 系统的根目录
$ cd ~
$ pwd
# /Users/xgqfrms-mbp
$ cd /
$ ls
# Applications Users cores home sbin var Library Volumes dev opt tmp System bin etc private usr
# etc, usr, home, Users
# 切换到 etc 并打开 hosts 文件
$ cd ../../etc
$ cd /etc && cat hosts
$ cd /etc && code hosts
$ cd /etc && sudo vim hosts
# :wq!
# php, nginx (created: 2020.08.08)
127.0.0.1 www.webfullstack.xyz
xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
Linux & change username & computer name & .bashrc的更多相关文章
- change username on ubuntu.
Below tutorial will show you how to change username in ubuntu 12.04 precise.First,we need login as r ...
- Linux 启动时profile、bashrc、~/.bash_profile、~/.bashrc、~/.bash_profile执行顺序以及文件说明
Linux 启动时profile.bashrc.~/.bash_profile.~/.bashrc.~/.bash_profile执行顺序以及文件说明 一.执行顺序 登录linux时,/etc/pro ...
- linux下/etc/profile /etc/bashrc /root/.bashrc /root/.bash_profile这四个配置文件的加载顺序
目录 一.关于linux配置文件 二.验证四个配置文件的加载顺序 三.结论 一.关于linux配置文件 1.linux下主要有四个配置文件:/etc/profile ./etc/bashrc ./ro ...
- linux /etc/profile和/etc/bashrc
/etc/profile:此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行,并从/etc/profile.d目录的配置文件中搜集shell的设置,/etc/bashrc:为每一个运 ...
- change Username for SVN(Subclipse) in Eclipse
Subclipse does not own the information about users and passwords (credentials), so there is no way f ...
- Linux下配置环境变量—— .bashrc 和 /etc/profile
转载:https://blog.csdn.net/sun8112133/article/details/79901527 首先简单说一下什么是环境变量?环境变量简单的说就是当前环境下的参数或者变量.如 ...
- Linux Change The I/O Scheduler For A Hard Disk
ow do I change the I/O scheduler for a particular hard disk without rebooting my Linux server system ...
- 数据仓库002 - 复习Linux shell命令 - echo bash_profile bashrc which命令的理解 alias history
1.echo 打印 . echo 的作用是在屏幕上打印输出内容,与文件和持久化可以理解为没有丝毫关联.如:在屏幕上打印“ echo 的作用是打印文字! ” 实例1:输出系统的环境变量名称 $PATH ...
- Linux的环境变量.bash_profile .bashrc profile文件
Shell变量有局部变量.环境变量之分.局部变量就是指在某个Shell中生效的变量,只在此次登录中有效.环境变量通常又称“全局变量”,虽然在Shell中变量默认就是全局的,但是为了让子Shall继承当 ...
随机推荐
- jquery 数据查询
jquery 数据查询 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> & ...
- babel : 无法加载文件 C:\Users\win\AppData\Roaming\npm\babel.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/ go.micros
babel报错:babel : 无法加载文件 C:\Users\win\AppData\Roaming\npm\babel.ps1,因为在此系统上禁止运行脚本.有关详细信息,请参阅 https:/ g ...
- etcd 性能优化实践
https://mp.weixin.qq.com/s/lD2b-DZyvRJ3qWqmlvHpxg 从零开始入门 K8s | etcd 性能优化实践 原创 陈星宇 阿里巴巴云原生 2019-12-16 ...
- spark join 广告用户特征 与广告特征的 join 拿到训练集
spark join 广告特征做广播
- forEach、for in、for of三者区别
forEach更多的用来遍历数组for in 一般常用来遍历对象或jsonfor of数组对象都可以遍历,遍历对象需要通过和Object.keys()for in循环出的是key,for of循环出的 ...
- CF733F
扯在前面 人生第一道黑(>▽< ). 那天听了老师讲图论讲了这道题,发现这道黑题并不是很黑于是就做了做,在同机房dalao的帮助下三个小时做完(太菜了),于是来发篇题解. 正文 题意 给出 ...
- loj10087
Southwestern Europe 2002,题面可参考 POJ 1201. 给定 n 个闭区间 [a_i,b_i] 和 n 个整数c_i .你需要构造一个整数集合Z ,使得对于任意i (1< ...
- 玩转IDEA项目结构Project Structure,打Jar包、模块/依赖管理全搞定
前言 你好,我是A哥(YourBatman). 如何给Module模块单独增加依赖? 如何知道哪些Module模块用了Spring框架,哪些是web工程? IDEA如何打Jar包?打War包? 熟练的 ...
- RabbitMQ (简单集群部署操作)
RabbitMQ 集群部署 前期准备 第一步:三台linux系统(centos7.3) 主机名(hostname) 网卡ip node1 192.168.137.138 node2 192.168.1 ...
- sentinel流控规则校验之源码分析
前言: 上节给大家把sentinel流控整个执行大致过了,但涉及到最核心的流控算法还没有讲,先提前说明一下 sentinel用的流控算法是令牌桶算法,参考了Guava的RateLimiter,有读过R ...