Skip to content

Instantly share code, notes, and snippets.

@dipaish
dipaish / permission.md
Last active October 3, 2024 06:39
Permissions & Ownerships

Permissions and Ownership

Clear the command history stored in the current session

For in-class tasks, you are required to execute the commands as instructed and capture the command history upon completion. To ensure that only the commands executed during the current session are captured, it’s recommended to start each session with a clean history. Use the following command to clear the command history stored in the current session.

# Clear the current session's history
history -c
  1. Execute ls -l in one of your directories that contains some items. Discuss the mode, owner and group of at least 3 of your files or directories.
@dipaish
dipaish / userPackageTasks.md
Last active October 7, 2024 17:25
user and package management tasks

User management Tasks

Clear the command history stored in the current session

For in-class tasks, you are required to execute the commands as instructed and capture the command history upon completion. To ensure that only the commands executed during the current session are captured, it’s recommended to start each session with a clean history. Use the following command to clear the command history stored in the current session.

# Clear the current session's history
history -c
@dipaish
dipaish / apt-get.md
Last active September 26, 2023 06:07
Managing Packages with Apt-Get
@dipaish
dipaish / user_package_manage.md
Last active November 4, 2024 11:43
User Management in Ubuntu

User Management in Linux

Adding and removing users on a Linux system is crucial for system administration. Typically, you start with just the root account, which has full control but can be risky. It's better to create standard users (with no admin rights) for common tasks. In order to execute commands with superuser privileges, you can either log in as a root user (sudo su , not recommended) or use sudo with your commands (recommended).

To perform admin tasks, Ubuntu has a tool called sudo, allowing you to run commands as other users, including administrators.

Create a New User.

You can use the useradd command to add a new user to the system.

@dipaish
dipaish / linuxCMd1.md
Last active November 21, 2024 22:57
Getting Started with Linux Command Line

Getting Started with Linux Command Line

How to start your WSL?

Open Ubuntu by simply searching 'Ubuntu' in your Windows search bar and clicking on the Ubuntu app. Once opened, you'll have access to the terminal where you can enter your commands.

Your Home folder in Ubuntu

In Ubuntu and many other Linux-based operating systems, the "Home folder" or "home directory" is a central location on your system where each user has their own dedicated storage space for personal files, documents, configuration files, and settings.