The famous selection of Linux bash commands: Difference between revisions

From chriesibaum wiki
Jump to navigation Jump to search
No edit summary
 
Line 22: Line 22:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
df -h  
df -h  
</syntaxhighlight>
'''ssh''' - Secure Shell
Connect to a remote host
<syntaxhighlight lang="bash">
ssh <user>@<host name / ip address>
</syntaxhighlight>
Run a command on the remote host
<syntaxhighlight lang="bash">
ssh <user>@<host name / ip address> '<command to run>'
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 09:09, 13 October 2021

User Management

usermod - modify user settings. Add a user to a group

usermod -a -G <examplegroup> <exampleusername>

E.g. add user geek to the sodo group:

usermod -a -G sudo geek


File System Tools

du: disk usage - Summarize disk usage of the set of FILEs, recursively for directories.

du -d2 -h


df - Show information about the file system on which each FILE resides, or all file systems by default.

df -h


ssh - Secure Shell Connect to a remote host

ssh <user>@<host name / ip address>


Run a command on the remote host

ssh <user>@<host name / ip address> '<command to run>'