能用上的Linux


title: 能用上的Linux
date: 2019-05-12 15:11:57
tags:

  • linux
  • arch
  • 折腾
  • 原创
  • shell
  • bash
  • 实用
  • 记录
    categories: Linux

常用需要记住

独显运行程序

optirun +< >

启动服务

systemctl start/restart/enable/disable/reload < >

结束进程

kill -9 < >

+++

查看端口占用

netstat -anp|grep 80

查看 磁盘及其挂载情况

df -h

VIM

命令
y 复制
p 粘贴
:wq 保存退出
:q! 强制退出
u 撤销
/ 搜索

常用目录

EFI目录

/boot/efi

grub配置文件

/boot/grub/grub.cfg


常用配置

grub中windows启动项配置模板

  • /boot/grub/grub.cfg
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-628C-6D96' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  628C-6D96
        else
          search --no-floppy --fs-uuid --set=root 628C-6D96
        fi
        chainloader /efi/Microsoft/Boot/bootmgfw.efi
}

systemd 服务配置模板

  • /usr/lib/systemd/system/*.service
[Unit]
Description=V2Ray Service
After=network.target
Wants=network.target

[Service]
# This service runs as root. You may consider to run it as another user for security concerns.
# By uncommenting the following two lines, this service will run as user v2ray/v2ray.
# More discussion at https://github.com/v2ray/v2ray-core/issues/1011
# User=v2ray
# Group=v2ray
Type=simple
PIDFile=/run/v2ray.pid
Environment=V2RAY_LOCATION_ASSET=/etc/v2ray
ExecStart=/usr/bin/v2ray -config /etc/v2ray/config.json
Restart=on-failure
# Don't restart in the case of configuration error
RestartPreventExitStatus=23

[Install]
WantedBy=multi-user.target

桌面快捷方式配置单

  • *.desktop
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=v2ray --config=/etc/v2ray/config.json
GenericName[en_US]=
GenericName=
Icon=truecrypt
MimeType=
Name[en_US]=V2ray
Name=V2ray
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

自动挂载项目

  • /etc/fstab
#      
# /dev/sda6
UUID=8efa9b5b-ef79-4c6a-9d1d-a8776bea051a       none            swap            defaults        0 0
# ntfs
/dev/sdb2                                       /home/archer/windowse   ntfs-3g  defaults,locale=en_US.UTF-8 0 0

你可能感兴趣的:(能用上的Linux)