Directory Navigation

Move up one level in the directory tree structure:

cd ..
Change directory to $HOME:

Change location to a specified directory:

cd /chosen/directory
File Compression
Archive an existing file:

tar cf [compressed_file.tar] [file_name]
Extract an archived file:

tar xf [compressed_file.tar]
Create a gzip compressed tar file by running:

tar czf [compressed_file.tar.gz]
Compress a file with the .gz extension:

gzip [file_name]
File Transfer
Copy a file to a server directory securely:

scp [file_name.txt] [server/tmp]
Synchronize the contents of a directory with a backup directory using the rsync command:

rsync -a [/your/directory] [/backup/]
See details about the active users:

Show last system logins:

Display who is currently logged into the system with the who command:

Show which users are logged in and their activity:

Add a new group by typing:

groupadd [group_name]
Add a new user:

adduser [user_name]
Add a user to a group:

usermod -aG [group_name] [user_name]
Temporarily elevate user privileges to superuser or root using the sudo command:

sudo [command_to_be_executed_as_superuser]
Delete a user:

userdel [user_name]
Modify user information with:


Leave a Reply

Your email address will not be published.