在阅读有关 Ubuntu 的内容时,我发现了以下声明.....
如果显示管理器默认没有在默认运行级别启动,您可以在登录到文本模式控制台后,通过从命令行运行 startx 以不同的方式启动 X。
默认运行级别是什么意思?当我在我的终端上尝试这个时,我得到了这个:
anupam@JAZZ:~$ startx
X: user not authorized to run the X server, aborting.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
Run Code Online (Sandbox Code Playgroud) 当我-al使用ls命令输入属性时,我得到以下信息:
anupam@JAZZ:~/blog$ ls -al
total 76
drwxrwxr-x 13 anupam anupam 4096 Aug 28 21:45 .
drwxr-xr-x 34 anupam anupam 4096 Aug 28 20:52 ..
drwxrwxr-x 8 anupam anupam 4096 Aug 28 12:19 app
drwxr-xr-x 2 anupam anupam 4096 Aug 28 12:19 bin
drwxrwxr-x 5 anupam anupam 4096 Aug 28 12:19 config
-rw-rw-r-- 1 anupam anupam 154 Aug 28 12:19 config.ru
drwxrwxr-x 3 anupam anupam 4096 Aug 28 12:37 db
-rw-rw-r-- 1 anupam anupam 1339 Aug 28 …Run Code Online (Sandbox Code Playgroud) 在阅读 Linux 时,我得到了以下信息:
touch 提供了几个选项,但这里有一个有趣的选项:
-t 选项允许您设置文件的日期和时间戳。要将时间戳设置为特定时间:
Run Code Online (Sandbox Code Playgroud)$ touch -t 03201600 myfile这会将文件 myfile 的时间戳设置为 3 月 20 日 (03 20 1600) 下午 4 点。
在这里,我没有理解 03201600 --> 3 月 20 日下午 4 点背后的逻辑。
在阅读 Linux 时,我得到了一个$ who -a,所以在尝试之前我分别登录了我的三个文本终端(tty1,tty2,tty3),然后我回到了X-window(Ctrl + Alt +f7),然后我尝试了:-
$ who
anupam tty2 2014-09-20 16:19
anupam tty3 2014-09-20 16:20
anupam tty1 2014-09-20 16:18
anupam :0 2014-09-20 16:14 (:0)
anupam pts/0 2014-09-20 16:21 (:0)
$ whoami
anupam
$ who -a
system boot 2014-09-20 16:13
run-level 2 2014-09-20 16:13
LOGIN tty4 2014-09-20 16:13 736 id=4
LOGIN tty5 2014-09-20 16:13 740 id=5
anupam - tty2 2014-09-20 16:19 00:01 3200
anupam - tty3 2014-09-20 16:20 . 3346
LOGIN tty6 …Run Code Online (Sandbox Code Playgroud) 在寻找匈牙利问题的解决方案时,我找到了这个 GitHub 链接。
我浏览了readme.md文件并执行了那里描述的所有内容。复制后hungarian.so到我的工作目录,当我试图编译hungarian.cpp使用make hungarian,我得到这样的输出:
anupam@JAZZ:~/Python/hungarian-master$ make hungarian
g++ hungarian.cpp -o hungarian
hungarian.cpp:7:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
make: *** [hungarian] Error 1
Run Code Online (Sandbox Code Playgroud)
我在 Stack Overflow 上找到了这个相关问题,但答案对我不起作用。
我对 GitHub 很陌生,我不知道如何在g++. 有人可以帮我解决这个问题,接下来该怎么做?
在阅读有关 linux 文件搜索的信息时,我得到了以下信息...
要使用 * 通配符搜索文件,请将未知字符串替换为 *,例如,如果您只记得扩展名为 .out,请键入 ls *.out
当我在系统(ubuntu 14.04 LTS)上尝试以下命令时..我得到了
anupam@JAZZ:~$ ls *.bash*
ls: cannot access *.bash* : No such file or directory
anupam@JAZZ:~$ ls .bash*
.bash_history .bash_logout .bash_profile .bashrc
anupam@JAZZ:~$
Run Code Online (Sandbox Code Playgroud)
在第一种情况下为什么它显示没有这样的目录(*.bash*),在下一种情况下它显示文件(.bash*)
我是这种风格的新手,根据我的自动机理论,类 (*) 表示包括 epsilon(empty) 在内的任何字符串组合,那么为什么这两种情况下的结果不同......?
在艰难地学习 bash 的过程中,我发现[和test既是命令又是同义词,而且都是内置的。
由于它是一个内置函数builtin [,它不应该给 任何错误,但我得到了-bash: [: missing `]',有人可以在这里向我解释内置函数 的行为吗?提前致谢。
anupam:Markdown$ which [
/usr/bin/[
anupam:Markdown$ echo $?
0
anupam:Markdown$ which test
/usr/bin/test
anupam:Markdown$ echo $?
0
anupam:Markdown$ builtin test
anupam:Markdown$ echo $?
1
anupam:Markdown$ builtin [
-bash: [: missing `]'
anupam:Markdown$ echo $?
2
anupam:Markdown$
Run Code Online (Sandbox Code Playgroud) 当我$ mount在我的系统(14.04 LTS)上尝试命令时,我发现了一些结果,比如......
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
Run Code Online (Sandbox Code Playgroud)
我没有得到这file system或device node none为mounted多个mount points像(/sys/fs/cgroup ,/sys/kernel/security, /run/shm etc)..
它是否推断存在nothing或它是一个file system或device node..?
在阅读 Linux 时,尤其是关于sudo,我得到了:
在未成功验证用户身份的情况下
/var/log/secure尝试执行时,系统日志文件(通常为)中会出现如下消息sudo bash:Run Code Online (Sandbox Code Playgroud)authentication failure; logname=op uid=0 euid=0 tty=/dev/pts/6 ruser=op rhost= user=op conversation failed auth could not identify password for [op] op : 1 incorrect password attempt ; TTY=pts/6 ; PWD=/var/log ; USER=root ; COMMAND=/bin/bash
然后我在我的 shell 提示符下试了一下:
anupam@JAZZ:~$ sudo bash
[sudo] password for anupam:
root@JAZZ:~#
Run Code Online (Sandbox Code Playgroud)
然后当我寻找时/var/log/secure,它不在那里
anupam@JAZZ:~$ more /var/log/secure
/var/log/secure: No such file or directory
anupam@JAZZ:~$ ls /var/log
alternatives.log auth.log dmesg gpu-manager.log mysql.log pm-suspend.log.2.gz upstart
alternatives.log.1 auth.log.1 dmesg.0 hp …Run Code Online (Sandbox Code Playgroud) 我遇到了以下声明..
在引导 Linux 时,引导加载程序负责将内核映像和初始 RAM 磁盘(其中包含启动系统所需的一些关键文件和设备驱动程序)加载到内存中。
加载内核映像和初始 RAM 磁盘是什么意思,是否有任何命令或应用程序可以让我从逻辑上看到它们所在的位置?