You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Contribution Guidelines/CONTRIBUTING.md
+109Lines changed: 109 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -227,6 +227,115 @@ New to Git? Check out these resources:
227
227
tutorial
228
228
-[Oh Shit Git](https://ohshitgit.com/) - Common problems and solutions
229
229
230
+
## Essential Linux Usage for Contributors
231
+
232
+
Linux is a powerful open-source operating system. As a contributor, understanding basic command-line usage is key. This guide covers essential commands, system updates, and best practices for command-line work.
233
+
234
+
---
235
+
236
+
### Basic Linux Commands
237
+
238
+
The command line is your main interface. Here are core commands you'll use often:
239
+
240
+
***`ls` (list):** Shows directory contents.
241
+
*`ls`: Lists files and directories in the current location.
*`rm -r <directory_name>`: Recursively deletes a directory (use with extreme caution!).
274
+
*_Example:_`rm -r old_project_folder` (Deletes the folder and everything inside it)
275
+
***`cat` (concatenate):** Displays a file's content.
276
+
*_Example:_`cat README.md` (shows the content of the README.md file)
277
+
***`less` / `more`:** Views file content page by page for large files.
278
+
*_Example:_`less /var/log/syslog` (allows you to scroll through a large log file; press `q` to quit)
279
+
***`grep`:** Searches for text patterns within files.
280
+
*_Example:_`grep "error" /var/log/syslog` (finds all lines containing "error" in the syslog file)
281
+
***`man` (manual):** Provides documentation for commands.
282
+
*_Example:_`man ls` (shows the manual page for the `ls` command; press `q` to quit)
283
+
284
+
---
285
+
286
+
### How to Update and Upgrade the System
287
+
288
+
Keeping your system updated is vital for security and new features. For Debian-based systems (like Ubuntu), use `apt`:
289
+
290
+
***`sudo apt update`**: Refreshes the list of available packages from repositories.
291
+
*_Example:_`sudo apt update` (You'll see a list of package information being downloaded)
292
+
***`sudo apt upgrade`**: Installs newer versions of all currently installed packages.
293
+
*_Example:_`sudo apt upgrade` (Prompts you to confirm the installation of available updates)
294
+
***`sudo apt full-upgrade`**: Performs a more comprehensive upgrade, installing new packages if needed for dependencies and removing obsolete ones.
295
+
*_Example:_`sudo apt full-upgrade` (Use for major system version upgrades or when `upgrade` is insufficient)
296
+
297
+
**To update:**
298
+
299
+
1. Open your terminal.
300
+
2. Run `sudo apt update`.
301
+
3. Then, run `sudo apt upgrade`.
302
+
4. Optionally, use `sudo apt full-upgrade` for a deeper update.
303
+
304
+
---
305
+
306
+
### How `sudo` and `apt` Work
307
+
308
+
***`sudo` (SuperUser DO):**
309
+
***Function:** Allows you to run commands with **root (administrator) privileges** using *your own password*.
310
+
***When to use:** For tasks requiring elevated permissions, like installing software, modifying system files, or managing services.
311
+
***Caution:** Always be careful with `sudo`; incorrect commands can harm your system.
312
+
*_Example:_`sudo systemctl restart apache2` (restarts the Apache web server, requires root privileges)
313
+
314
+
***`apt` (Advanced Package Tool):**
315
+
***Function:** A command-line utility for managing software packages (installing, updating, removing) on Debian-based systems. It interacts with software repositories.
316
+
***When to use:**
317
+
*`apt install <package_name>`: Install new software.
318
+
* _Example:_`sudo apt install git` (installs the Git version control system)
*`apt purge <package_name>`: Uninstall software and its configuration files.
322
+
*_Example:_`sudo apt purge apache2`
323
+
*`apt search <keyword>`: Find packages.
324
+
*_Example:_`apt search text editor` (lists available text editor packages)
325
+
326
+
---
327
+
328
+
### Tips for Command-Line Navigation and Safety
329
+
330
+
Here are some best practices to make your command-line work more efficient and secure:
331
+
332
+
***Tab Completion:** Press the `Tab` key to auto-complete commands, file names, or directory names. Press `Tab` twice to see all available options if there's more than one.
333
+
***Arrow Keys:** Use the `Up` and `Down` arrow keys to cycle through your command history. This saves typing and helps recall previous commands.
334
+
***`Ctrl+R` (Reverse Search):** Press `Ctrl+R` and start typing to search your command history for a specific command. It's incredibly useful for finding a command you ran a while ago.
335
+
***Read the Manual (`man`):** If you're unsure about a command or its options, use `man <command_name>` for detailed documentation. Press `q` to quit the manual.
336
+
***Be Careful with `sudo`:** Always double-check your commands before pressing Enter when using `sudo`. Commands run with root privileges can make significant, irreversible changes to your system if executed incorrectly.
337
+
***Backup Regularly:** Make a habit of backing up important files and configurations, especially before performing major system changes or software installations. This can save you from potential data loss.
0 commit comments