---
title: "xiaohan (@xiaohan) | Hashnode"
description: "xiaohan (@xiaohan) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@xiaohan"
---

@xiaohan

# xiaohan

@xiaohan · Joined April 2022

### [软路由网关的实现](https://xiaohan.hashnode.dev/soft-router?utm_source=hashnode&utm_medium=feed)

设备准备 一台路由器，网关电脑，和客户机电脑。 路由器：192.168.1.1 网关机： 有两个网卡，分别为ens33(192.168.1.101), ens34(192.168.1.102) 客户机，有一个网卡(192.168.1.201)。 第一步，网关 效果： 客户机的流量→网关机→公网 实现方式： 开启转发 编译文件/etc/sysctl.conf 加入 net.ipv4.ip\_forward=1 然后执行sudo sysctl -p 配置iptables: sudo iptab...

3 min read · [xiaohan.hashnode.dev](https://xiaohan.hashnode.dev/soft-router?utm_source=hashnode&utm_medium=feed)

[Nov 17, 2024](https://hashnode.com/posts/soft-router/6739869b46f144ba79ed48ac)

### [在Linux（Ubuntu）下安装Arial、Times New Roman等字体](https://xiaohan.hashnode.dev/linuxubuntuarialtimes-new-roman?utm_source=hashnode&utm_medium=feed)

在Linux下做文档、作图的时候，可能需要用到Arial和Times New Roman等字体。但是由于版权问题，Linux一般是不直接提供这些字体的。注意字体也是有版权的！不过有版权也不代表一定会收费。 如何安装呢？以Ubuntu为例，执行以下指令即可： $ sudo apt install ttf-mscorefonts-installer # 安装 $ sudo fc-cache # 生效 由于前面提到版权问题，虽然这部分字体不收费，但是安装时需要用户同意一些协议，同意即可。执行完成后，...

1 min read · [xiaohan.hashnode.dev](https://xiaohan.hashnode.dev/linuxubuntuarialtimes-new-roman?utm_source=hashnode&utm_medium=feed)

[Jul 21, 2024](https://hashnode.com/posts/linuxubuntuarialtimes-new-roman/669cb4c5a4a3346cbd325a43)

### [i3wm如何退出登录](https://xiaohan.hashnode.dev/i3wm?utm_source=hashnode&utm_medium=feed)

i3-msg exit

1 min read · [xiaohan.hashnode.dev](https://xiaohan.hashnode.dev/i3wm?utm_source=hashnode&utm_medium=feed)

[Jul 21, 2024](https://hashnode.com/posts/i3wm/669cb472dcc27986760f55f8)

### [Spark RDD如何获取TaskId](https://xiaohan.hashnode.dev/spark-rddtaskid?utm_source=hashnode&utm_medium=feed)

利用TaskContext.getPartitionId()获取分区Id。 rdd.partitionBy(partitioner) .foreachPartition(iter->{ int id=TaskContext.getPartitionId(); StringBuilder sb = new StringBuilder(); sb.append("Pid=").append(id); while(iter.hasNext()){ ...

1 min read · [xiaohan.hashnode.dev](https://xiaohan.hashnode.dev/spark-rddtaskid?utm_source=hashnode&utm_medium=feed)

[Jul 21, 2024](https://hashnode.com/posts/spark-rddtaskid/669cb43e6234faa99432c61b)

### [Hdfs如何退出安全模式](https://xiaohan.hashnode.dev/hdfs-1?utm_source=hashnode&utm_medium=feed)

在使用hdfs时出现Name node is in safe mode.问题， 说明hdfs处于安全模式。 执行如下命令即可退出安全模式。 hadoop dfsadmin -safemode leave 来自 https://www.cnblogs.com/yaoss/p/12555745.html

1 min read · [xiaohan.hashnode.dev](https://xiaohan.hashnode.dev/hdfs-1?utm_source=hashnode&utm_medium=feed)

[Jul 21, 2024](https://hashnode.com/posts/hdfs-1/669cb3c8afe69f5813902fe9)
