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继承当 ...
随机推荐
- 宝塔Linux命令
安装宝塔 Centos安装脚本 5.7:yum install -y wget && wget -O install.sh http://download.bt.cn/install/ ...
- Language Guide (proto3) | proto3 语言指南(开篇)
前言 近日在学习gRPC框架的相关知识时接触到Protobuf(protocol-buffers,协议缓冲区),proto3等知识.网上很多文章/帖子经常把gRPC与proto3放在一起,为避免初学者 ...
- CSS 文本效果
对于CSS文本的一些效果,基础一些的知识比较简单,但对于text-indent,vertical-align,text-align等的深入学习能够使我们对HTML5的学习更加轻松,对这部分知 ...
- Spring5源码,Spring Web中的处理程序执行链
一.什么是Spring中的处理程序执行链? 二.HandlerExecutionChain类 三.自定义处理程序执行链 Spring的DispatcherServlet假如缺少几个关键元素将无法分派请 ...
- (31)sed命令完全攻略
1.sed简介 Vim 采用的是交互式文本编辑模式,你可以用键盘命令来交互性地插入.删除或替换数据中的文本.但本节要讲的 sed 命令不同,它采用的是流编辑模式,最明显的特点是,在 sed 处理数据之 ...
- DEDECMS:解决BMP、jpeg图片或MP4视频无法上传和在后台无法显示
一.BMP图片无法上传解决方法: 1.修改配置文件: 在include-->dialog的文件夹下, select_images_post.php--> 把 $sparr = Array( ...
- springboot中的parent依赖作用详解
最近在阅读springboot+vue全栈开发实战,松哥编写的,虽然比较简单,各种技术没有深入讲解,但是还是可以看看的,特别是我这个前端菜鸟哈哈,以后可是要学习全栈的,把书中看到的不会的地方会记录下笔 ...
- CSAPP_AttackLab实验报告
目录 屏幕截图 考察内容 各题答案 level1 level2 level3 level4 level5 解题思路 level1 任务 思路 level2 任务 思路 level3 任务 思路 lev ...
- 牛客NC15879 A Simple Problem
传送门:A Simple Problem 题意 给定两个序列s1和s2,同样的数字可以用相同的别的数字代替(并且也可以是出现过的数字),问s2在s1中出现了几次. 题解 首先预处理一下这两个序列,因为 ...
- 2019牛客多校 Round5
Solved:4 Rank:122 补题:8/10 A digits 2 签到 把这个数写n遍 #include <bits/stdc++.h> using namespace std; ...