開機卡logo或安裝卡%0
啓動界面按e鍵進入編輯界面,先修改保證可以進入正常啓動:
在splash quiet後面加
nouveau.modeset=0
之後修改/boot/grub/grub.cfg文件
vim /boot/grub/grub.cfg
在splash quiet後面加nouveau.modeset=0
// intel_pstate=disable
CPU自動調頻
Linux上基本改用了intel_pstate驅動來替代原有acpi驅動進行cpu管理intel處理器,只有Peformance和Powersave兩檔,風扇轉動快,耗電快…
首先可以通過安裝cpufrequtils來查看cpu頻率:
sudo apt install cpufrequtils
修改/etc/default/grub
文件:
#sudo vim /etc/default/grub
# Written by com.deepin.daemon.Grub2
DEEPIN_GFXMODE_ADJUSTED=1
GRUB_CMDLINE_LINUX=""
GRUB_CMDLINE_LINUX_DEFAULT="splash quiet nouveau.modeset=0 intel_pstate=disable"
GRUB_DEFAULT=0
GRUB_DISTRIBUTOR="`/usr/bin/lsb_release -d -s 2>/dev/null || echo Deepin`"
GRUB_GFXMODE=1920x1080
GRUB_THEME="/boot/grub/themes/deepin/theme.txt"
GRUB_TIMEOUT=1
在GRUB_CMDLINE_LINUX_DEFAULT
中的quiet
後面加intel_pstate=disable
即可;
其中nouveau.modeset=0
是防止開機卡logo處;
最後執行命令:
sudo update-grub
開機重啓;
最後修改每個
cpu文件:
su root
cd /sys/devices/system/cpu
echo conservative | tee cpu*/cpufreq/scaling_governor
最終效果:
終端短路徑
vim ~/.bashrc
修改60和70行:
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]\$ '
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u:\[\033[01;34m\]\W\[\033[00m\]\$ '
#PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \W\a\]$PS1"
PS1="\[\e]0; \W\a\]$PS1"
deepin終端仿kali配色
sudo cp ~/.bashrc /root/.bashrc
vim ~/.config/deepin/deepin-terminal/config.conf
[general]
theme=aci
opacity=1
font=Noto Mono
font_size=11
[shortcut]
copy=Ctrl + c
paste=Ctrl + v
open=Alt + q
search=Ctrl + f
zoom_in=Ctrl + =
zoom_out=Ctrl + -
default_size=Ctrl + 0
select_all=Ctrl + a
jump_to_next_command=Shift + Down
jump_to_previous_command=Shift + Up
new_workspace=Ctrl + Shift + t
close_workspace=Ctrl + Shift + w
next_workspace=Ctrl + Tab
previous_workspace=Ctrl + Shift + Tab
vertical_split=Ctrl + Shift + j
horizontal_split=Ctrl + Shift + h
select_upper_window=Alt + k
select_lower_window=Alt + j
select_left_window=Alt + h
select_right_window=Alt + l
close_window=Ctrl + Alt + q
close_other_windows=Ctrl + Shift + q
rename_title=F2
switch_fullscreen=F11
display_shortcuts=Ctrl + Shift + ?
custom_commands=Ctrl + [
remote_management=Ctrl + /
select_workspace=Alt
new_theme_terminal=Ctrl + Alt
resize_workspace_up=Ctrl + Alt + Up
resize_workspace_down=Ctrl + Alt + Down
resize_workspace_left=Ctrl + Alt + Left
resize_workspace_right=Ctrl + Alt + Right
[advanced]
cursor_shape=ibeam
cursor_blink_mode=true
cursor_auto_hide=false
scroll_on_key=true
scroll_on_output=false
scroll_line=-1
use_on_starting=window
blur_background=false
window_width=941
window_height=668
quake_window_height=0
quake_window_fullscreen=false
remote_commands=zssh
hide_quakewindow_after_lost_focus=false
show_quakewindow_tab=true
follow_active_window=true
hide_quakewindow_when_active=true
print_notify_after_script_finish=true
run_as_login_shell=false
show_highlight_frame=false
copy_on_select=false
bold_is_bright=false
audible_bell=false
always_hide_resize_grip=false
tabbar_at_the_bottom=false
[theme]
color_1=#363636
color_2=#ff0883
color_3=#e01900
color_4=#ff8308
color_5=#0883ff
color_6=#8308ff
color_7=#08ff83
color_8=#b6b6b6
color_9=#424242
color_10=#ff1e8e
color_11=#8eff1e
color_12=#ff8e1e
color_13=#1e8eff
color_14=#8e1eff
color_15=#1eff8e
color_16=#c2c2c2
background=#0d1926
foreground=#fbf5ef
tab=#31B96E
style=dark
[theme_terminal]
theme1=solarized dark
theme2=bim
theme3=hemisu light
theme4=gruvbox light
theme5=elementary
theme6=azu
theme7=aco
theme8=miu
theme9=material
vim設置
安裝Vundle:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
安裝auto-pairs插件:
git clone git://github.com/jiangmiao/auto-pairs.git ~/.vim/bundle/auto-pairs
# vim /etc/vim/vimrc
set nocompatible " be iMproved, required
filetype off " required
set rtp+=/home/sir/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'jiangmiao/auto-pairs'
call vundle#end()
filetype plugin indent on
set ts=4
set nu
set expandtab
set smartindent
set cindent
set shiftwidth=4
set softtabstop=4
gdb編譯
主要解決內核調試remote問題;
源碼下載:
http://ftp.gnu.org/gnu/gdb
國內源: https://mirrors.ustc.edu.cn/gnu/gdb/
源碼修改,將./gdb/remote.c中:
if (buf_len > 2 * rsa->sizeof_g_packet)
error (_("Remote 'g' packet reply is too long: %s"), rs->buf);
修改爲:
if (buf_len > 2 * rsa->sizeof_g_packet) {
rsa->sizeof_g_packet = buf_len;
for (i = 0; i < gdbarch_num_regs (gdbarch); i++)
{
if (rsa->regs[i].pnum == -1)
continue;
if (rsa->regs[i].offset >= rsa->sizeof_g_packet)
rsa->regs[i].in_g_packet = 0;
else
rsa->regs[i].in_g_packet = 1;
}
}
配置:
./configure -prefix=/usr/local/gdb \
--with-python='/usr/bin/python3.5'
編譯:
make -j8
安裝依賴等:
sudo aptitude install texinfo
安裝:
sudo make install
.gdbinit:
#/home/sir/tools/pwndbg/docs/gdb
set architecture i386:x86-64:intel
更換主目錄
修改user-dirs.dirs即可:
cat ~/.config/user-dirs.dirs
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_PUBLICSHARE_DIR="$HOME/.Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
XDG_TEMPLATES_DIR="$HOME/.Templates"
無法開啓窗口特效
解決辦法:
- win+shift+tab快速切換
~/.config/deepin/deepin-wm-switcher/config.json
配置文件中的allow_switch
的值是不是false,如果是false,改成true
,註銷重新登陸~/.config/kwinrc
配置文件中的OpenGLIsUnsafe
改成false
,註銷重新登陸
安裝kali工具最安全有效方法
安裝docker
sudo apt-get install docker-ce
可能會出現網絡太慢造成的timeout
斷線問題,可以直接根據情況下載最新deb包進行安裝:
https://download.docker.com/linux/debian/dists/stretch/pool/stable/amd64/docker-ce_19.03.11~3-0~debian-stretch_amd64.deb
添加切換加速器:
#sudo vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://registry.docker-cn.com"]
}
注意如果這個文件寫錯了,在重新啓動docker時可能會出現錯誤:
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
pip修改源
python3 -m pip install --upgrade pip --force-reinstall
Python源:
#在root用戶下執行:
vim ~/.pip/pip.conf
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/
中國科學技術大學 https://pypi.mirrors.ustc.edu.cn/simple/
阿里雲 https://mirrors.aliyun.com/pypi/simple/
豆瓣(douban) https://pypi.douban.com/simple/
AFL
afl-fuzz
官網下載:
http://lcamtuf.coredump.cx/afl/
安裝:
make
make install
通常的格式:
afl-fuzz -i testcase_dir -o findings_dir /path/to/program [params]
使用“@@”替換輸入文件,Fuzzer會將其替換爲實際執行的文件:
afl-fuzz -i testcase_dir -o findings_dir /path/to/program @@
afl-llvm
cd llvm_mode
sudo apt-get install clang-3.9
export LLVM_CONFIG=`which llvm-config-3.9`
make
sudo make install
afl-utils
git clone https://github.com/rc0r/afl-utils.git
cd afl-utils/
sudo python ./setup.py install