日常问题日志

A: 安装ntpdate,并输入以下命令,可以解决每次开机自动更新时间问题. [S]

  • sudo apt install ntpdate
  • echo “natpdate edu.ntp.org.cn” >> /etc/profile
  • chmod +s /usr/sbin/ntpdate
  • source /etc/profile

  • 调整虚拟机设置-常规-高级里的”共享粘贴板”和”拖放”设置为”双向”. 依然无法粘贴. [F]

  • 键入命令行 VBoxClient –clipboard 开起剪切板服务. [S]
  • 将剪切板服务加入启动项,自动开启. [S] [220709]
  • echo “VBoxClient –clipboard” | sudo tee -a /etc/profile [More Q4]
  • Ctrl + Shift + v 粘贴操作在 terminal 中已可将 windows 下复制网址进行粘贴.

  • 如果之后还是会出现无法复制情况,按下列命令键入. [S] *[220709]

apt-get remove -y virtualbox-guest-x11
apt-get remove -y virtualbox-guest-dkms
apt-get remove -y virtualbox-guest-utils
reboot
wget https://download.virtualbox.org/virtualbox/6.1.2/VBoxGuestAdditions_6.1.2.iso
mkdir /media/iso
mount VBoxGuestAdditions_6.1.2.iso /media/iso -o loop
/media/iso/VBoxLinuxAdditions.run
yes
reboot
  • staging helps you split up one large change into multiple commit.

  • staging helps in reviewing changes.

  • staging helps when a merge has conflicts.

  • staging helps you keep extra local files hanging around.

  • staging helps you sneak in small changes.

  • 例如问题 -bash: /etc/profile: Permission denied.

  • The redirection of the output is not performed by sudo.

  • 进入 ~/.bashrc 里对 PS1 进行编辑,退出后利用 source ~/.bashrc 重新加载. [S]

  • PS1颜色的设置格式: [ \033[ @m \ ]. 其中 @ 代表颜色值,如浅绿 1;32, 浅红 1;31.

A: /usr/include/x86_64-linux-gnu/bits/sigstack.h

  • define SIGSTKSZ 8192.

  • In Ubuntu this man page belongs to manpages-dev package.

  • sudo apt-get install manpages manpages-dev manpages-posix manpages-posix-dev.

A: 关键命令

  • Check for existing SSH Key: ls -al ~/.ssh.

  • Generate new SSH Key: ssh-keygen -t ed25519 -C “your_email@example.com”

  • Adding SSH Key to the ssh-agent: ssh-add ~/.ssh/id_rsa.

  • Copy the SSH public key to github account: cat ~/.ssh/id_rsa.pub.

  • Test SSH connection: ssh -T git@github.com.

A: A segmentation fault ( SEGFAULT ) occurs when you are trying to access memory which you should not be trying to access ( the memory which you have not allocated ) .

  • Writing to read-only memory rasies a segmentation fault.

  • Out of array range: Core Dump.

  • Global variable and local variable use the same name.

[220914]
* When dereferencing a NULL pointer.

  • When dereferencing an uninitialized or dangling pointer.

  • When you get a Buffer Overflow.

  • when you get a Stack Overflow.

  • When you try to change the value of a variable marked as const using pointers.

  • When you try to access free’d memory.

[S] [221120]
* 使用gdb调试找出问题程序行.

  • Both exit(0) and exit(1) are jump statments and are used to terminate the program.

And both report the status of termination of the program to the operating system.

  • exit(0) define the clean exit without any error in the program.

  • exit(1) means that it is an abnormal or unsuccessful termianation of the program.

A: Tabular plugin

  • In Ubuntu 16.10, has enabled “–enable-default-pie” option by default.

  • specify “-no-pie” option during link stage of generating final executable binary.

  • the linker needs the library file to find the actual code to link into your program.

  • gcc hello1.c -o hello1 -lcurses. ( “-l”+”header” )

  • attempts to write to an uninitialised pointer.

Original: https://www.cnblogs.com/Dy2MoRaw/p/16457298.html
Author: Dy2MoRaw
Title: 日常问题日志

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/583794/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球