为什么在 Ubuntu 中很难找到文件?

hey*_*hey 39 linux ubuntu

在 Ubuntu 中很难找到文件。在 Windows 中,您可以直接访问C:\Program Files并找到您需要的内容。在 Ubuntu 中,你必须使用搜索来找到你需要的东西。也许我错过了什么?

Jam*_*ell 109

为什么在 Ubuntu 中很难找到文件?

为什么直升机的功能不像热气球?

为什么 Microsoft Office 不像打字机那样工作?

为什么我不能在 iOS 上使用 Android 应用程序?

这里也进行了同样的比较。Unixes(包括 Ubuntu)是与 Windows (NT) 截然不同的平台。NT是它自己的一种特殊的野兽。用 NT 范式判断 Linux 有点类似于使用汽油发动机力学对柴油发动机进行故障排除。它们有很多共同点,但也有令人难以置信的差异。

把猫当作狗玩,很少会带来满足感。您必须调整您的范式以适应您的平台。每个架构都有特定的优点和约定,如果您要避免拉回一个血腥的小块,您必须遵守这些优点和约定。

范式失败 (漫画来自这里

“在 Windows 中,您可以直接访问C:\Program Files并找到您需要的东西。” - 真的?你确定吗?Windows 在Registry 中存储了一些非常关键的东西,它不在 Program Files 下。“我的文档”也不在程序文件中,但通常会包含您想查看的内容..

“在 Ubuntu 中,你必须使用搜索来找到你需要的东西。” 没错,如果您一开始不知道它在哪里。这同样适用于任何事情,无处不在。现在,我那愚蠢的车钥匙呢?不,不在C:\Program Files..该死的! 比利时!

“也许我错过了什么?” 可能只是对在操作环境中如何管理内容背后的主要概念的一般性介绍。


介绍如何在操作环境中组织内容

无论您的操作环境如何(Windows、macOS、Linux、您的办公桌),已经出现了有助于在系统中组织内容以实现易用性和可扩展性的模式。

通用系统范围的东西

在公司中,这将是政策文件等。在操作系统中,这将是保持运行所需的核心文件。在 Windows 文件结构中,这C:\WINDOWS就是全部。在基于 Unix 的系统中,有各种目录/Libraries(Mac OS X)和/etc(Linux)用于这些类型的事情。用户很少,如果有的话,真的需要处理这个以供一般用途。

用户特定的东西

在办公室里,人们通常有自己指定的工作空间。存储在这些位置的是特定于个人的文档/内容。

操作系统是一样的。在 Windows 上,“我的文档”文件夹特定于每个用户,并且只包含该用户的文件。在 Linux 上,/home/[username]专用于此目的。在 macOS 上,/Users/[username]是。

通常,用户的个人空间在其中具有专用于特定类别的位置。例如,Windows 有“我的图片”目录,位于“我的文档”。在 Ubuntu Linux 上,您会发现/home/[username]/Pictures - macOS 有其明显的等效项。

工具管理

在办公室里,当你想要一个新工具时,通常会有一个系统来管理它。我特别考虑库存。库存通常会密切关注您拥有的物品及其状况。

在 Windows =添加/删除程序加上注册表。

在 Ubuntu Linux 上 = apt包管理器 - 使用Synaptic 包管理器aptitude或其他前端到apt

在 Mac OS X 10.6+ 上 = App Store(和/Applications,在某种程度上)。

变得更具体

正如无耻地从这里复制的那样,在 Ubuntu 中找到的一般系统目录结构遵循以下约定:

/bin - binary applications (most of your executable files)

/boot - files required to boot (such as the kernel, etc.)

/dev - your devices (everything from drives to displays)

/etc - just about every configuration file for your system

/etc/profile.d - contains scripts that are run by /etc/profile upon login.

/etc/rc.d - contains a number of shell scripts that are run on bootup at different run levels. There is also typically an rc.inet1 script to set up networking (in [Slackware][6]), an rc.modules script to load modular device drivers, and an rc.local script that can be edited to run commands desired by the administrator, along the lines of autoexec.bat in DOS.

/etc/rc.d/init.d - contains most of the initialization scripts themselves on an [RPM][7]-based system.

/etc/rc.d/rc*.d - where “*” is a number corresponding to the default run level. Contains files for services to be started and stopped at that run level. On RPM-based systems, these files are symbolic links to the initialization scripts themselves, which are in /etc/rc.d/init.d.

/etc/skel - directory containing several example or skeleton initialization shells. Often contains subdirectories and files used to populate a new user’s home directory.

/etc/X11 - configuration files for the X Window system

/home - locally stored user files and folders

/lib - system libraries (similar to Program Files)

/lost+found - lost and found for lost files

/media - mounted (or loaded) devices such as cdroms, digital cameras, etc.

/mnt - mounted file systems

/opt - location for “optionally” installed programs

/proc - dynamic directory including information about and listing of processes

/root - “home” folder for the root user

/sbin - system-only binaries (see /bin)

/sys - contains information about the system

/tmp - temporary files

/usr - applications mainly for regular users

/var - mainly logs, databases, etc.

/usr/local/bin - the place to put your own programs. They will not be overwritten with upgrades.

/usr/share/doc - documentation.
Run Code Online (Sandbox Code Playgroud)

在 Ubuntu 中查找东西的一般提示

了解你在处理什么样的动物,除非你讨厌自己的脸。

带有牙齿和爪子的绒毛球


Jou*_*eek 13

如果需要查找程序的位置,可以使用该which命令。它还有助于理解Unix 文件系统层次结构-/etc/用于配置文件、/usr/bin/全局命令二进制文件(并且/usr/包含大多数(多)用户实用程序和应用程序),等等。您可以使用locate,slocaterlocate从命令行搜索文件。

/home/user 与您的文档和设置或 /users/user 文件夹相同。

这并不难,只是不同而已。

  • s/只是不同/非常优越 (7认同)
  • 好吧,我不是要开始操作系统的火焰战争 - 对我来说,OP 的真正问题不在于技术优势,而在于了解有效使用受 Unix 启发的操作系统所需的心态 (6认同)
  • @Doc,“[Unix] 非常出色”是*非常* 主观的,我作为 Linux 用户这么说。 (5认同)
  • *非常主观*,也许。尽管如此*正确*。 (3认同)