📄 linux commands line.htm
字号:
'%10{SIZE}\t%{NAME}\n' | sort -k1,1n</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>show space used by rpm packages
installed sorted by size (fedora, redhat and
like)</TD></TR>
<TR height=29>
<TD height=29><SPAN class=Stile36 style3>dpkg-query -W
-f='${Installed-Size;10}\t${Package}\n' | sort
-k1,1n</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>show space used by deb packages
installed sorted by size (ubuntu, debian and
like)</TD></TR>
<TR height=17>
<TD align=middle colSpan=2 height=17><SPAN
class=Stile20 style3>linux commands line v1.0 -
LinuxGuide.it </SPAN></TD></TR>
<TR height=17>
<TD bgColor=#000000 colSpan=2 height=17><SPAN
class=titolo_cmdline style3>Users and Groups
</SPAN></TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>groupadd
group_name</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>create a new group</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>groupdel
group_name</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>delete a group</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>groupmod -n
new_group_name old_group_name</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>rename a group</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>useradd -c
"Nome Cognome" -g admin -d /home/user1 -s
/bin/bash user1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>create a new user belongs
"admin" group</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>useradd
user1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>create a new user</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>userdel -r
user1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>delete a user ( '-r' eliminates
home directory)</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>usermod -c
"User FTP" -g system -d /ftp/user1 -s
/bin/nologin user1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>change user attributes</TD></TR>
<TR height=17>
<TD height=17><SPAN
class=Stile36 style3>passwd</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>change password</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>passwd
user1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>change a user password (only by
root)</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>chage -E
2005-12-31 user1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>set deadline for user
password</TD></TR>
<TR height=29>
<TD height=29><SPAN
class=Stile36 style3>pwck</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>check correct syntax and file
format of '/etc/passwd' and users
existence</TD></TR>
<TR height=29>
<TD height=14><SPAN
class=Stile36 style3>grpck</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>check correct syntax and file
format of '/etc/group' and groups
existence</TD></TR>
<TR height=29>
<TD height=14 class=Stile36 style3>newgrp
group_name</TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>log in to a new group to change
default group of newly created files</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>alias
hh='history'</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>set an alias for a command - hh
= history</TD></TR>
<TR height=17>
<TD align=middle colSpan=2 height=17><SPAN
class=Stile20 style3>linux commands line v1.0 -
LinuxGuide.it </SPAN></TD></TR>
<TR height=34>
<TD bgColor=#000000 colSpan=2 height=34><SPAN
class=titolo_cmdline style3>Permits on File - use "+"
to set permissions and "-" to remove
</SPAN></TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>ls
-lh</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>show permits</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>ls /tmp | pr
-T5 -W$COLUMNS</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>divide terminal into 5
columns</TD></TR>
<TR height=29>
<TD height=29><SPAN class=Stile36 style3>chmod ugo+rwx
directory1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>set permissions reading (r),
write (w) and (x) access to users owner (u)
group (g) and others (o)</TD></TR>
<TR height=29>
<TD height=29><SPAN class=Stile36 style3>chmod go-rwx
directory1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>remove permits reading (r),
write (w) and (x) access to users group (g) and
others (or</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>chown user1
file1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>change owner of a file</TD></TR>
<TR height=29>
<TD height=29><SPAN class=Stile36 style3>chown user1 -R
directory1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>change user owner of a directory
and all the files and directories contained
inside</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>chgrp gruppo1
file1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>change group of files</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>chown
user1:gruppo1 file1</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>change user and group ownership
of a file</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>find / -perm
-u+s</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>view all files on the system
with SUID configured</TD></TR>
<TR height=29>
<TD height=29><SPAN class=Stile36 style3>chmod u+s
/bin/file_eseguibile</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>set SUID bit on a binary file -
the user that running that file gets same
privileges as owner</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>chmod u-s
/bin/file_binario</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>disable SUID bit on a binary
file</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>chmod g+s
/home/public</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>set SGID bit on a directory -
similar to SUID but for directory</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>chmod g-s
/home/public</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>disable SGID bit on a
directory</TD></TR>
<TR height=29>
<TD height=29><SPAN class=Stile36 style3>chmod o+t
/home/comune</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>set STIKY bit on a directory -
allows files deletion only to legitimate
owners</TD></TR>
<TR height=17>
<TD height=17><SPAN class=Stile36 style3>chmod o-t
/home/comune</SPAN></TD>
<TD width=387
bgColor=#e0e0e0 class=descrizione style3>disable STIKY bit on a
directory</TD></TR>
<TR height=17>
<TD align=middle colSpan=2 height=17><SPAN
class=Stile20 style3>linux commands line v1.0 -
LinuxGuide.it </SPAN></TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -