<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ubuntu &#8211; 老丁的博客</title>
	<atom:link href="https://www.laoding.me/archives/tag/ubuntu/feed" rel="self" type="application/rss+xml" />
	<link>https://www.laoding.me</link>
	<description></description>
	<lastBuildDate>Sat, 12 Oct 2024 04:47:41 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://public-123.oss-cn-guangzhou.aliyuncs.com/2024/09/cropped-图片_20240927133356-768x768-1-32x32.jpg</url>
	<title>Ubuntu &#8211; 老丁的博客</title>
	<link>https://www.laoding.me</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>SSH连接从A服务器下载文件到B服务器</title>
		<link>https://www.laoding.me/archives/721</link>
					<comments>https://www.laoding.me/archives/721#respond</comments>
		
		<dc:creator><![CDATA[laoding]]></dc:creator>
		<pubDate>Wed, 09 Oct 2024 13:50:42 +0000</pubDate>
				<category><![CDATA[办公网络]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[服务器]]></category>
		<guid isPermaLink="false">https://www.laoding.me/?p=721</guid>

					<description><![CDATA[1.命令格式 scp username@server_ip:/path/to/file /local/path [&#8230;]]]></description>
										<content:encoded><![CDATA[<h3>1.命令格式</h3>
<pre class="code">scp username@server_ip:/path/to/file /local/path/on/A</pre>
<h3>2.示例命令</h3>
<pre class="code">scp root@119.47.126.109:/root/myfile.zip /root</pre>
<p><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-722" src="https://public-123.oss-cn-guangzhou.aliyuncs.com/2024/10/20241009134951748.jpg?x-oss-process=image/auto-orient,1/quality,q_90/format,webp" alt="" width="673" height="147" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.laoding.me/archives/721/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>windows虚拟机中Ubuntu系统共享挂载</title>
		<link>https://www.laoding.me/archives/639</link>
					<comments>https://www.laoding.me/archives/639#respond</comments>
		
		<dc:creator><![CDATA[laoding]]></dc:creator>
		<pubDate>Wed, 02 Oct 2024 06:06:40 +0000</pubDate>
				<category><![CDATA[办公网络]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[虚拟机]]></category>
		<guid isPermaLink="false">https://www.laoding.me/?p=639</guid>

					<description><![CDATA[1、虚拟机设置 共享目录C:\Users\sz\VirtualBox VMs\share 2、Ubuntu中运 [&#8230;]]]></description>
										<content:encoded><![CDATA[<h3>1、虚拟机设置</h3>
<p><img decoding="async" src="https://www.laoding.me/wp-content/media/202404/12_1712991523.jpg" alt="" /><br />
共享目录<code>C:\Users\sz\VirtualBox VMs\share</code></p>
<h3>2、Ubuntu中运行挂载命令</h3>
<pre><code class="language-c">sudo mkdir /media/share</code></pre>
<pre><code class="language-c">sudo mount -t vboxsf share /media/share</code></pre>
<p><img decoding="async" src="https://www.laoding.me/wp-content/media/202404/13_1712991711.jpg" alt="" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.laoding.me/archives/639/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>编译OpenWrt系统流程</title>
		<link>https://www.laoding.me/archives/635</link>
					<comments>https://www.laoding.me/archives/635#respond</comments>
		
		<dc:creator><![CDATA[laoding]]></dc:creator>
		<pubDate>Wed, 02 Oct 2024 06:03:34 +0000</pubDate>
				<category><![CDATA[办公网络]]></category>
		<category><![CDATA[数码硬件]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[openwrt]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.laoding.me/?p=635</guid>

					<description><![CDATA[1.安装编译依赖 sudo apt update -y sudo apt full-upgrade -y su [&#8230;]]]></description>
										<content:encoded><![CDATA[<h3>1.安装编译依赖</h3>
<pre><code class="language-c">sudo apt update -y</code></pre>
<pre><code>sudo apt full-upgrade -y</code></pre>
<pre><code class="language-c">sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev</code></pre>
<h3>2.下载源代码</h3>
<p>以下源码三选一下载，也可以使用其他团队的源码</p>
<table>
<thead>
<tr>
<th>列名</th>
<th>列名</th>
<th>列名</th>
</tr>
</thead>
<tbody>
<tr>
<td>git clone <a href="https://github.com/openwrt/openwrt">https://github.com/openwrt/openwrt</a></td>
<td>官方版本</td>
<td>内核新</td>
</tr>
<tr>
<td>git clone <a href="https://github.com/coolsnowwolf/lede">https://github.com/coolsnowwolf/lede</a> </td>
<td>lede版本</td>
<td>插件多</td>
</tr>
<tr>
<td>git clone -b 22.03 &#8211;single-branch <a href="https://github.com/Lienol/openwrt">https://github.com/Lienol/openwrt</a></td>
<td>lienol版本</td>
<td>小而快</td>
</tr>
</tbody>
</table>
<p>如需指定openwrt版本，可以使用以下命令</p>
<pre><code class="language-c">git tag</code></pre>
<p>查看稳定版，回车键拉到最低，按Q结束！</p>
<pre><code class="language-c">git checkout v22.03.3</code></pre>
<p>指定版本，红色部分位版本号</p>
<h3>3.切换到文件目录</h3>
<pre><code class="language-c">cd openwrt</code></pre>
<h3>4.添加插件或主题</h3>
<p>打开openwrt文件夹，找到feeds.conf.default文件打开，添加到最下面！</p>
<pre><code class="language-c">src-git amlogic https://github.com/ophub/luci-app-amlogic   #amlogicCPU必须添加
src-git alist https://github.com/sbwml/luci-app-alist       #Alist插件
src-git passwall_packages https://github.com/xiaorouji/openwrt-passwall.git;packages
src-git passwall_luci https://github.com/xiaorouji/openwrt-passwall.git;luci
src-git kenzo https://github.com/kenzok8/openwrt-packages
src-git argonnew https://github.com/jerrykuku/luci-theme-argon.git;main    #主题</code></pre>
<h3>5.更新源码</h3>
<pre><code class="language-c">./scripts/feeds update -a   #更新源码</code></pre>
<pre><code class="language-c">./scripts/feeds install -a  #拷贝源码</code></pre>
<h3>6.定制openwrt系统</h3>
<p>打开openwrt配置面板</p>
<pre><code class="language-c">make menuconfig</code></pre>
<p>————-————————————————————————————————————</p>
<ul>
<li>必须设置项目（CPU架构，镜像文件格式）</li>
</ul>
<pre><code>Target System  -&gt;  QEMU ARM Virtual Machine 
Subtarget -&gt;  QEMU ARMv8 Virtual Machine (cortex-a53)
Target Profile  -&gt;  Default
Target Images  -&gt;   tar.gz</code></pre>
<ul>
<li>必选软件包(基础依赖包，仅保证打出的包可以写入EMMC,可以在EMMC上在线升级，不包含具体的应用)：</li>
</ul>
<pre><code class="language-c">Languages -&gt; Perl
             -&gt;  perl-http-date
             -&gt;  perlbase-file
             -&gt;  perlbase-getopt
             -&gt;  perlbase-time
             -&gt;  perlbase-unicode
             -&gt;  perlbase-utf8
Utilities -&gt; Compression -&gt; bsdtar 或 p7zip(非官方源)、pigz
          -&gt; Disc -&gt; blkid、fdisk、lsblk、parted
          -&gt; Filesystem -&gt; attr 、btrfs-progs(Build with zstd support)、chattr、dosfstools、e2fsprogs、f2fs-tools、f2fsck、lsattr、mkf2fs、xfs-fsck、xfs-mkfs
          -&gt; Shells  -&gt;  bash         
          -&gt; gawk、getopt、losetup、tar、uuidgen</code></pre>
<ul>
<li>Wifi基础包，打出的包可支持博通SDIO无线模块,Firmware不用选，因为打包源码中已经包含了来自Armbian的firmware，会自动覆盖openwrt rootfs中已有的firmware</li>
</ul>
<pre><code class="language-c">Kernel modules -&gt; Wireless Drivers -&gt; kmod-brcmfmac(SDIO) 
                                   -&gt; kmod-brcmutil
                                   -&gt; kmod-cfg80211
                                   -&gt; kmod-mac80211
                -&gt; USB Support -&gt; kmod-usb-net-asix
                               -&gt; kmod-usb-net-asix-ax88179
                               -&gt; kmod-usb2
                               -&gt; kmod-usb3</code></pre>
<ul>
<li>红色为选填，如果你需要！USB3.0转千兆网卡（型号：亚信asix-ax88179）则必选！</li>
</ul>
<pre><code class="language-c">Network  -&gt;  WirelessAPD -&gt; hostapd-common
                         -&gt; wpa-cli
                         -&gt; wpad-basic
                         -&gt;  iw</code></pre>
<ul>
<li>插件和主题，语言设置选项，根据需求设置，为了减少编译失败的概率，除了必要的晶晨插件，其他都不要安装，主题也是。可以编译成功后单独编译插件在安装。</li>
</ul>
<pre><code class="language-c">LUCI -&gt; 2.Modules -&gt; Translations -&gt; Chinese simplified 简体中文 自选
          -&gt; 3.Applications  -&gt; luci-app-amlogic  #晶晨插件，必选
          -&gt; 4. Themes   #尽量不要安装，不然容易后台面板进不去！</code></pre>
<h3>7.如果需要重新配置</h3>
<p>方法：使用命令</p>
<pre><code class="language-c">rm -rf ./tmp &amp;&amp; rm -rf .config
make menuconfig
make V=s -j$(nproc)</code></pre>
<h5>1.下载 dl 库，编译固件 （-j 后面是线程数）</h5>
<pre><code class="language-c">make -j8 download V=s</code></pre>
<h5>2.下载dl库，V=s 显示任务详细情况</h5>
<pre><code class="language-c">make V=s -j4</code></pre>
<blockquote>
<p>4代表线程，根据个人实际情况调整</p>
</blockquote>
<h5>3.如果编译失败，可以执行以下命令：</h5>
<blockquote>
<p>“make clean”删除编译目录/bin和/build_dir目录中的文件</p>
<p>“make dirclean”除了删除编译目录之外还删除编译工具目录，删除/bin和/build_dir目录的中的文件(make clean)以及/staging_dir、/toolchain、/tmp和/logs中的文件，一般在更换CPU架构的情况下才操作。</p>
</blockquote>
<h5>4.下载编译压缩包</h5>
<p>编译完成后输出路径：home/用户名/openwrt/bin/targets</p>
<h3>8. 安装并开通SSH登录方法：</h3>
<h5>1，必须切换成为root用户</h5>
<pre><code>sudo -i</code></pre>
<h5>2，先更新软件列表和更新软件</h5>
<pre><code>sudo apt-get update</code></pre>
<h5>3，先更新软件列表和更新软件</h5>
<pre><code>sudo apt-get upgrade</code></pre>
<h5>4，安装ssh</h5>
<pre><code>apt-get install ssh</code></pre>
<h5>5，启动ssh服务</h5>
<pre><code>sudo /etc/init.d/ssh start</code></pre>
<h5>6，检查是否有ssh环境</h5>
<pre><code>ps -e | grep ssh</code></pre>
<h5>7.ubuntu开通root登录SSH权限</h5>
<p>使用普通用户登录后切换root</p>
<pre><code>sudo -i</code></pre>
<p>创建root管理员密码</p>
<pre><code>passwd root</code></pre>
<p>开启root登录</p>
<pre><code>sudo sed -i &#039;s/^#\?PermitRootLogin.*/PermitRootLogin yes/g&#039; /etc/ssh/sshd_config </code></pre>
<p>开启密码验证</p>
<pre><code>sudo sed -i &#039;s/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g&#039; /etc/ssh/sshd_config   </code></pre>
<p>重启ssh服务</p>
<pre><code>service sshd restart</code></pre>
<p>检查是否有ssh环境</p>
<pre><code>ps -e | grep ssh</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.laoding.me/archives/635/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux 查看硬件配置命令</title>
		<link>https://www.laoding.me/archives/631</link>
					<comments>https://www.laoding.me/archives/631#respond</comments>
		
		<dc:creator><![CDATA[laoding]]></dc:creator>
		<pubDate>Wed, 02 Oct 2024 05:48:46 +0000</pubDate>
				<category><![CDATA[办公网络]]></category>
		<category><![CDATA[数码硬件]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.laoding.me/?p=631</guid>

					<description><![CDATA[一、系统 1.查看内核/操作系统/CPU信息 uname -a 2.查看操作系统版本 head -n 1 /e [&#8230;]]]></description>
										<content:encoded><![CDATA[<h2>一、系统</h2>
<h4>1.查看内核/操作系统/CPU信息</h4>
<pre><code>uname -a</code></pre>
<h4>2.查看操作系统版本</h4>
<pre><code class="language-c">head -n 1 /etc/issue</code></pre>
<h4>3.查看CPU信息</h4>
<pre><code class="language-c">cat /proc/cpuinfo</code></pre>
<h4>4.查看计算机名</h4>
<pre><code class="language-c">hostname</code></pre>
<h4>5.列出所有PCI设备</h4>
<pre><code class="language-c">lspci -tv</code></pre>
<h4>6.列出所有USB设备</h4>
<pre><code class="language-c">lsusb -tv</code></pre>
<h4>7.列出加载的内核模块</h4>
<pre><code class="language-c">lsmod</code></pre>
<h4>8.查看环境变量</h4>
<pre><code class="language-c">env</code></pre>
<h2>二、资源</h2>
<h4>1.查看内存使用量和交换区使用量</h4>
<pre><code class="language-c">free -m</code></pre>
<pre><code class="language-c">cat /proc/meminfo</code></pre>
<h4>2.查看各分区使用情况</h4>
<pre><code class="language-c">df -h</code></pre>
<h4>3.查看指定目录的大小</h4>
<pre><code class="language-c">du -sh &lt;目录名&gt;</code></pre>
<h4>4.查看内存总量</h4>
<pre><code class="language-c">grep MemTotal /proc/meminfo</code></pre>
<h4>5.查看空闲内存量</h4>
<pre><code class="language-c">grep MemFree /proc/meminfo</code></pre>
<h4>6.查看系统运行时间、用户数、负载</h4>
<pre><code class="language-c">uptime</code></pre>
<h4>7.查看系统负载</h4>
<pre><code class="language-c">cat /proc/loadavg</code></pre>
<h2>三、磁盘和分区</h2>
<h4>1.查看挂接的分区状态</h4>
<pre><code class="language-c">mount | column -t</code></pre>
<h4>2.查看所有分区大小</h4>
<pre><code class="language-c">df -h</code></pre>
<pre><code class="language-c">fdisk -l</code></pre>
<h4>3.查看所有交换分区</h4>
<pre><code class="language-c">swapon -s</code></pre>
<h4>4.查看磁盘参数（仅适用于IDE设备）</h4>
<pre><code class="language-c">hdparm -i /dev/hda</code></pre>
<h4>5.查看启动时IDE设备检测状况</h4>
<pre><code class="language-c">dmesg | grep IDE</code></pre>
<h2>四、网络</h2>
<h4>1.查看所有网络接口的属性</h4>
<pre><code class="language-c">ifconfig</code></pre>
<h4>2.查看防火墙设置</h4>
<pre><code class="language-c">iptables -L</code></pre>
<h4>3.查看路由表</h4>
<pre><code class="language-c">route -n</code></pre>
<h4>4.查看所有监听端口</h4>
<pre><code class="language-c">netstat -lntp</code></pre>
<h4>5.查看所有已经建立的连接</h4>
<pre><code class="language-c">netstat -antp</code></pre>
<h4>6.查看网络统计信息</h4>
<pre><code class="language-c">netstat -s</code></pre>
<h2>五、进程</h2>
<h4>1.查看所有进程</h4>
<pre><code class="language-c">ps -ef</code></pre>
<h4>2.实时显示进程状态</h4>
<pre><code class="language-c">top</code></pre>
<p>六、用户</p>
<h4>1.查看活动用户</h4>
<pre><code class="language-c">w</code></pre>
<h4>2.查看指定用户信息</h4>
<pre><code class="language-c">id &lt;用户名&gt;</code></pre>
<h4>3.查看用户登录日志</h4>
<pre><code class="language-c">last</code></pre>
<h4>4.查看系统所有用户</h4>
<pre><code class="language-c">cut -d: -f1 /etc/passwd</code></pre>
<h4>5.查看系统所有组</h4>
<pre><code class="language-c">cut -d: -f1 /etc/group</code></pre>
<h4>6.查看当前用户的计划任务</h4>
<pre><code class="language-c">crontab -l</code></pre>
<h2>六、服务</h2>
<h4>1.列出所有系统服务</h4>
<pre><code class="language-c">chkconfig --list</code></pre>
<h4>2.列出所有启动的系统服务</h4>
<pre><code class="language-c">chkconfig --list | grep on</code></pre>
<h2>七、程序</h2>
<h4>1.查看所有安装的软件包</h4>
<h4>rpm -qa</h4>
<p>八、其他常用命令整理如下：</p>
<h4>1.查看主板的序列号：</h4>
<pre><code class="language-c">dmidecode | grep -i &#039;serial number&#039;</code></pre>
<p>用硬件检测程序kuduz探测新硬件：service kudzu start （ or restart）  </p>
<p>查看CPU信息：cat /proc/cpuinfo [dmesg | grep -i &#8216;cpu&#8217;][dmidecode -t processor]  </p>
<p>查看内存信息：cat /proc/meminfo [free -m][vmstat]  </p>
<p>查看板卡信息：cat /proc/pci  </p>
<p>查看显卡/声卡信息：lspci |grep -i &#8216;VGA'[dmesg | grep -i &#8216;VGA&#8217;]  </p>
<p>查看网卡信息：dmesg | grep -i &#8216;eth'[cat /etc/sysconfig/hwconf | grep -i eth][lspci | grep -i &#8216;eth&#8217;]  </p>
<p>查看PCI信息：lspci （相比cat /proc/pci更直观）  </p>
<p>查看USB设备：cat /proc/bus/usb/devices  </p>
<p>查看键盘和鼠标：cat /proc/bus/input/devices  </p>
<p>查看系统硬盘信息和使用情况：fdisk &amp; disk – l &amp; df  </p>
<p>查看各设备的中断请求（IRQ）：cat /proc/interrupts  </p>
<p>查看系统体系结构：uname -a  </p>
<p>查看及启动系统的32位或64位内核模式：isalist –v [isainfo –v][isainfo –b]  </p>
<p>查看硬件信息，包括bios、cpu、内存等信息：dmidecode  </p>
<p>测定当前的显示器刷新频率：/usr/sbin/ffbconfig –rev \?  </p>
<p>查看系统配置：/usr/platform/sun4u/sbin/prtdiag –v  </p>
<p>查看当前系统中已经应用的补丁：showrev –p  </p>
<p>显示当前的运行级别：who –rH  </p>
<p>查看当前的bind版本信息：nslookup –class=chaos –q=txt version.bind  </p>
<p>查看硬件信息：dmesg | more  </p>
<p>显示外设信息， 如usb，网卡等信息：lspci  </p>
<p>查看已加载的驱动：</p>
<blockquote>
<p>lsnod<br />
lshw</p>
</blockquote>
<p>查看当前处理器的类型和速度（主频）：psrinfo -v  </p>
<p>打印当前的OBP版本号：prtconf -v  </p>
<p>查看硬盘物理信息（vendor， RPM， Capacity）：iostat –E  </p>
<p>查看磁盘的几何参数和分区信息：prtvtoc /dev/rdsk/c0t0d0s   </p>
<p>显示已经使用和未使用的i-node数目：</p>
<blockquote>
<p>df –F ufs –o i <br />
isalist –v</p>
</blockquote>
<p>对于“/proc”中文件可使用文件查看命令浏览其内容，文件中包含系统特定信息：</p>
<blockquote>
<p>主机CPU信息：Cpuinfo <br />
主机DMA通道信息：Dma <br />
文件系统信息：Filesystems <br />
主机中断信息：Interrupts <br />
主机I/O端口号信息：Ioprots <br />
主机内存信息：Meninfo <br />
Linux内存版本信息：Version</p>
</blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://www.laoding.me/archives/631/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>VMware ubuntu虚拟机怎么设置分辨率</title>
		<link>https://www.laoding.me/archives/629</link>
					<comments>https://www.laoding.me/archives/629#respond</comments>
		
		<dc:creator><![CDATA[laoding]]></dc:creator>
		<pubDate>Wed, 02 Oct 2024 05:47:52 +0000</pubDate>
				<category><![CDATA[办公网络]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[虚拟机]]></category>
		<guid isPermaLink="false">https://www.laoding.me/?p=629</guid>

					<description><![CDATA[1. VMware工具安装 VMware Tools 是一套可以提高虚拟机客户机性能并增强与宿主机交互功能的软 [&#8230;]]]></description>
										<content:encoded><![CDATA[<h2>1. VMware工具安装</h2>
<p>VMware Tools 是一套可以提高虚拟机客户机性能并增强与宿主机交互功能的软件套件。其中包括了一个叫<code>vmxnet</code>的驱动，它能够使得虚拟机内的操作系统自动识别宿主机器的屏幕分辨率，并且能够在全屏模式下自适应改变大小。</p>
<pre><code>sudo apt-get update</code></pre>
<pre><code>sudo apt-get upgrade</code></pre>
<pre><code>sudo apt-get install open-vm-tools-desktop</code></pre>
<pre><code>reboot</code></pre>
<p><strong>注意</strong>：如果上述命令执行后，还是无法实现全屏或者大屏显示，那么需要进行下面的手动设置。</p>
<h2>2. 手动设置分辨率</h2>
<p>如果使用 VMware Tools 自动设置分辨率无效，你可以手动设置分辨率。步骤如下：</p>
<h4>2.1 获取可用分辨率</h4>
<p>首先，我们需要知道哪些分辨率可用。我们可以通过下面的命令来查看：</p>
<pre><code>xrandr</code></pre>
<p>这个命令将显示所有可用的分辨率。在输出中，你会看到像这样的信息：</p>
<pre><code>Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192
VGA1 connected primary 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1024x768       60.0* 
   800x600        60.3     56.2  
   848x480        60.0  
   640x480        59.9  </code></pre>
<h4>2.2 添加新的分辨率</h4>
<p>如果你需要的分辨率不在列表中，你可以添加一个新的分辨率。下面的命令演示如何添加1920&#215;1080的分辨率：</p>
<pre><code>xrandr --newmode &quot;1920x1080_60.00&quot;  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync</code></pre>
<pre><code>xrandr --addmode Virtual1 1920x1080_60.00</code></pre>
<h4>2.3 应用新的分辨率</h4>
<p>要应用新的分辨率，只需执行以下命令：</p>
<pre><code>xrandr --output Virtual1 --mode 1920x1080_60.00</code></pre>
<h2>3. 持久化设置</h2>
<p>完成以上步骤后，你的分辨率应该已经成功更改。但是，当你重启虚拟机时，这些更改可能会失效。为了解决这个问题，你需要创建一个脚本，在每次启动时运行，以应用新的分辨率。</p>
<p>你可以在你的主目录中创建一个名为<code>.xprofile</code>的文件，然后添加以下内容：</p>
<pre><code>#!/bin/sh
xrandr --newmode &quot;1920x1080_60.00&quot;  173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync
xrandr --addmode Virtual1 1920x1080_60.00
xrandr --output Virtual1 --mode 1920x1080_60.00</code></pre>
<p>确保此文件具有执行权限：</p>
<pre><code>chmod +x ~/.xprofile</code></pre>
<hr />
]]></content:encoded>
					
					<wfw:commentRss>https://www.laoding.me/archives/629/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>linux系统防火墙开放端口等命令</title>
		<link>https://www.laoding.me/archives/627</link>
					<comments>https://www.laoding.me/archives/627#respond</comments>
		
		<dc:creator><![CDATA[laoding]]></dc:creator>
		<pubDate>Wed, 02 Oct 2024 05:46:00 +0000</pubDate>
				<category><![CDATA[办公网络]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.laoding.me/?p=627</guid>

					<description><![CDATA[一、查看防火墙状态 1.查看防火墙状态 systemctl status firewalld 2.开启防火墙  [&#8230;]]]></description>
										<content:encoded><![CDATA[<h2>一、查看防火墙状态</h2>
<h4>1.查看防火墙状态</h4>
<pre><code class="language-c">systemctl status firewalld</code></pre>
<h4>2.开启防火墙</h4>
<pre><code class="language-c">systemctl start firewalld</code></pre>
<p>3.关闭防火墙</p>
<pre><code class="language-c">systemctl stop firewalld</code></pre>
<blockquote>
<p>若遇到无法开启<br />
先用：<code>systemctl unmask firewalld.service</code><br />
然后：<code>systemctl start firewalld.service</code></p>
</blockquote>
<h2>二、查看对外开放的端口状态</h2>
<h4>1.查询已开放的端口列表</h4>
<pre><code class="language-c">firewall-cmd --zone=public --list-ports</code></pre>
<h4>2.查询指定端口是否开放</h4>
<pre><code class="language-c">netstat -apn | grep 端口号</code></pre>
<h4>3.查询指定端口是否已开</h4>
<pre><code class="language-c">firewall-cmd --query-port=666/tcp</code></pre>
<blockquote>
<p>提示 yes，表示开启；no表示未开启。</p>
</blockquote>
<h2>三、对外开发端口</h2>
<h4>1.查看想开的端口是否已开</h4>
<pre><code class="language-c">firewall-cmd --query-port=123/tcp</code></pre>
<h4>2.添加指定需要开放的端口</h4>
<pre><code class="language-c">firewall-cmd --add-port=123/tcp --permanent</code></pre>
<h4>3.重载入添加的端口</h4>
<pre><code class="language-c">firewall-cmd --reload</code></pre>
<h4>4.查询指定端口是否开启成功</h4>
<pre><code class="language-c">firewall-cmd --query-port=123/tcp</code></pre>
<h4>5.移除指定端口</h4>
<pre><code class="language-c">firewall-cmd --permanent --remove-port=123/tcp</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.laoding.me/archives/627/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux查看进程、监听端口以及终止的命令方法</title>
		<link>https://www.laoding.me/archives/353</link>
					<comments>https://www.laoding.me/archives/353#respond</comments>
		
		<dc:creator><![CDATA[laoding]]></dc:creator>
		<pubDate>Wed, 02 Oct 2024 04:16:20 +0000</pubDate>
				<category><![CDATA[办公网络]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.laoding.me/?p=353</guid>

					<description><![CDATA[查看进程 1.PS命令 输入下面的ps命令，显示所有运行中的进程： ps aux &#124; less 其中， -A： [&#8230;]]]></description>
										<content:encoded><![CDATA[<h3>查看进程</h3>
<h4>1.PS命令</h4>
<p>输入下面的ps命令，显示所有运行中的进程：</p>
<pre><code class="language-java">ps aux | less</code></pre>
<p>其中，<br />
-A：显示所有进程<br />
a：显示终端中包括其它用户的所有进程<br />
x：显示无控制终端的进程</p>
<p>任务：查看系统中的每个进程。</p>
<pre><code class="language-java">ps -A</code></pre>
<pre><code class="language-java">ps -e</code></pre>
<p>任务：查看非root运行的进程</p>
<pre><code class="language-java">ps -U root -u root -N</code></pre>
<p>任务：查看用户vivek运行的进程</p>
<pre><code class="language-java">ps -u vivek</code></pre>
<h4>2.用netstat查看网络连接及程序信息</h4>
<pre><code class="language-java">netstat -lntp</code></pre>
<p><img decoding="async" src="https://www.laoding.me/wp-content//media/202310/1698551219390_1698551226.png" alt="" title="用netstat查看网络连接及程序信息" /><br />
Local Address：内网地址<br />
Foreign Address：外网地址<br />
State：状态<br />
PID/Program name：进程PID/程序名称</p>
<h4>3.用PS命令查询程序运行地址</h4>
<pre><code class="language-java">ps 1351</code></pre>
<p><img decoding="async" src="https://www.laoding.me/wp-content//media/202310/1698551661849_1698551670.png" alt="" title="用PS命令查询程序运行地址" /></p>
<h3>使用Kill终止进程</h3>
<pre><code class="language-java">kill 1676</code></pre>
<p><img decoding="async" src="https://www.laoding.me/wp-content//media/202310/1698553533040_1698553542.png" alt="" title="使用Kill终止进程" /><br />
有的程序加入了自启动功能，需要利用程序的命令停止运行，如：</p>
<pre><code class="language-java">sudo service zerotier-one stop</code></pre>
<h3>进入程序目录删除程序</h3>
]]></content:encoded>
					
					<wfw:commentRss>https://www.laoding.me/archives/353/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu连接蓝牙耳机报错br-connection-profile-unavailable解决方法</title>
		<link>https://www.laoding.me/archives/351</link>
					<comments>https://www.laoding.me/archives/351#respond</comments>
		
		<dc:creator><![CDATA[laoding]]></dc:creator>
		<pubDate>Wed, 02 Oct 2024 04:11:04 +0000</pubDate>
				<category><![CDATA[办公网络]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.laoding.me/?p=351</guid>

					<description><![CDATA[安装依赖包，wireplumber-doc可以选择性 sudo apt install wireplumber [&#8230;]]]></description>
										<content:encoded><![CDATA[<h1>安装依赖包，wireplumber-doc可以选择性</h1>
<pre><code>sudo apt install wireplumber libspa-0.2-bluetooth</code></pre>
<pre><code>sudo apt-get install pipewire pipewire-pulse</code></pre>
<h1>重启wireplumber</h1>
<pre><code>systemctl --user restart wireplumber   </code></pre>
<h1>安装蓝牙管理器</h1>
<pre><code>sudo apt install blueman</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.laoding.me/archives/351/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
