-2

I switch user to root used su. but i still couldnt cd /etc/group but the group folder is in my /etc folder.

root@Desktop:/etc# cd group
bash: cd: group: Not a directory

radiorz
  • 95
  • If you were on a UNIX with NFS extended attribute support, you could run runat /etc/group to get a shell with the current working directory set to /etc/group – schily Sep 11 '21 at 10:40

1 Answers1

3

/etc/group isn’t a folder, it’s a file:

cat /etc/group

It’s used to define groups and their memberships (locally).

If you examine /etc/group with ls -l, you’ll get something like

-rw-r--r-- 1 root root 2487 Sep  4 14:04 /etc/group

The leading - means it’s a regular file; a folder (or directory) would have a leading d. See Understanding UNIX permissions and file types for details.

Stephen Kitt
  • 434,908