{"id":21399641,"url":"https://github.com/natancabral/linux-learn","last_synced_at":"2026-04-16T07:31:39.449Z","repository":{"id":114483814,"uuid":"306732095","full_name":"natancabral/linux-learn","owner":"natancabral","description":"The Linux command line is a text interface to your computer. Often referred to as the shell, terminal, console, prompt or various other names. This tutorial will teach you a little more about commands line on Linux.","archived":false,"fork":false,"pushed_at":"2021-01-18T19:25:27.000Z","size":143,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T15:52:42.144Z","etag":null,"topics":["bash","linux","linux-command","sh","shell","shell-script","terminal","tutorial","ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/natancabral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-23T19:44:03.000Z","updated_at":"2021-01-18T19:25:30.000Z","dependencies_parsed_at":"2023-05-16T22:45:25.496Z","dependency_job_id":null,"html_url":"https://github.com/natancabral/linux-learn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/natancabral/linux-learn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natancabral%2Flinux-learn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natancabral%2Flinux-learn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natancabral%2Flinux-learn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natancabral%2Flinux-learn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natancabral","download_url":"https://codeload.github.com/natancabral/linux-learn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natancabral%2Flinux-learn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31876324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"online","status_checked_at":"2026-04-16T02:00:06.042Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","linux","linux-command","sh","shell","shell-script","terminal","tutorial","ubuntu"],"created_at":"2024-11-22T15:15:54.805Z","updated_at":"2026-04-16T07:31:39.440Z","avatar_url":"https://github.com/natancabral.png","language":"Shell","readme":"# Linux Learn\n\nen: The Linux command line is a text interface to your computer. Often referred to as the shell, terminal, console, prompt or various other names, it can give the appearance of being complex and confusing to use. Yet the ability to copy and paste commands from a website, combined with the power and flexibility the command line offers.\n\nThis tutorial will teach you a little more about commands line on Linux.\n\npt: A linha de comando do Linux é uma interface de texto para o seu computador. Freqüentemente referido como shell, terminal, console, prompt ou vários outros nomes, pode dar a aparência de ser complexo e confuso de usar. Ainda assim, a capacidade de copiar e colar comandos de um site, combinada com o poder e flexibilidade que a linha de comando oferece.\n\nEste tutorial vai te ensinar um pouco mais sobre linha de comando no Linux.\n\n---\n\n## Simples Commands\n\n* en: Create folder\n```bash\nmkdir /tmp/tutorial\n```\n* en: Enter folder\n```bash\ncd /tmp/tutorial\n```\n* en: Back folder\n```bash\ncd .. # go back\ncd / # go root drive\n```\n* en: List folder\n```bash\nls\nls -a # show all hidden files\nls -la # show all hidden files on listing format\nls -ld .?* # show all hidden directory on listing format\n# Explain:\n# -a                show all files (ALL)\n# -l                use a long listing format\n# -d, --directory   list  directory entries instead of contents, and do not dereference /media/natancabral/FILES/developer/olic links\n# .?*               will only state hidden files \n```\n* en: Write output list\n```bash\nls \u003e output.txt\n```\n* en: Displayed Text on screen\n```bash\necho \"Hello Word\"\n```\n* en: Writer Text in file\n```bash\necho \"Hello Word\" \u003e savefile.txt\n```\n* en: Add text on end file \n```bash\necho \"Final Line\" \u003e\u003e savefile.txt  \n```\n* en: Move file\n```bash\nmv myfile.txt dir1\nls dir1\n```\n* en: Move all files on \"dir1\" foder into \"current\" folder (single dot (.) can be used to represent the current working)\n```bash\nmv dir1/* .\n```\n* en: Backup file\n```bash\nmv backup_combined.txt combined_backup.txt\nmv \"folder1\" \"folder1_back\"\n```\n* en: Move folder/path\n```bash\nmv fromPath/ toPath/\nmv fromPath/ ../toPath/\n```\n* en: Copy Files\n\u003e [font](https://www.linuxtechi.com/cp-command-examples-linux-beginners)\n```bash\ncp\ncp /etc/passwd /mnt/backup/\ncp /etc/passwd /etc/group /etc/shadow /mnt/backup/ # multiple copys file to /mnt/backup/\ncp -i # interactively (show copy process)\ncp -n # do not overwrite\n```\n* en: Copy Directory or Folder\n```bash\ncp -r \ncp -r /etc/passwd /mnt/backup/\ncp -ir # interactively (show copy process)\ncp -n # do not overwrite\n```\n* en: Remove Files and Folders\n```bash\nrm file.ext\nrm folder\nrmdir folder* # delete folder1,folder2,folder_,folder... \nrmdir folder1/* # delete into folder1/\nrm -r folder_name # very dangers (delete files and folders names)\nrm -rf folder_name # very very 2x dangers (delete files and folders names)\n# -r - recursive\n# -f - force\n```\n* en: Show tree folder (install: $ sudo apt install tree)\n```bash\ntree\ntree -a\n```\n* en: Creating Symbolic Link | Symlink\n```bash\n# ln -s \u003csource_file_directory\u003e \u003clink_file_directory\u003e\n# -s stands for symbolic link (make symbolic links instead of hard links)\nsudo ln -s /home/\u003cusername\u003e/Downloads /Downloads\nsudo ln -s /home/\u003cusername\u003e/Downloads Downloads\nsudo ln -s /media/\u003cusername\u003e/\u003cHD\u003e/files/local/developer/ Dev\n# remove Symlink\nunlink \u003clink\u003e\nrm \u003clink\u003e\nunlink Dev\n# --------------------------------------------\n# To access Symlink:\ncd Dev\ncd /Downloads\ncd Downloads\n```\n* en: User access\n```bash\nsudo su -nameuserhere # to access your username\nsudo su -- # root user\n```\n* en: Find in /Home (~/) size files \u003e 1GB and list then\n* pt: Busque por arquivos em /Home de tamanho maior que 1GB e liste\n```bash\nfind ./ -name \"*gnnc*\" -type f # f files | d directories\nfind ~ -size +1G -ls\nfind ~ -maxdepth 2 -ls -name *.ini\nfind ./folder_name -maxdepth 1 -name *.php\nfind -maxdepth 3 -name \"*.ini\" -not -path ~ -ls\nfind -name \"*.ini\" -path ~ -ls\nfind -name \"*.ini\" ! -name \"*config.*\" -ls # AND ! not have\nfind -name \"*.php\" -o -name \"*.js\" -ls # -o OR have\nfind . –user maria # on user path\n# -type f - only files\n# -type d - only directories\n# -ls - show list\n# -maxdepth - max depth find \n# -name - have filename\n# ! -name - not have filename\n# -not -name - not have filename\n# -o - OR\n# -path - local path\n# -user - nameuser\n# font: https://e-tinet.com/linux/comando-find-linux/\n```\n\n## System Commands\n\n* en: Displays all of your previous commands up to the history limit.\n```bash\nhistory\n```\n* en: Print Working Directory. Ubuntu command displays the full pathname \n```bash\npwd\n```\n* en: Display System storage\n```bash\ndf\n```\n* en: Free space avaliable\n```bash\nfree\n```\n* en: Display Process\n```bash\ntop\n```\n* en: Change Password User\n```bash\npasswd \u003cuser\u003e\n```\n* en: Knolege: WHAT IS (command)\n```bash\nwhatis \u003ccommand\u003e\nwhatis cp\nwhatis su\nwhatis passwd\n```\n* en: Manual: MAN (command)\n```bash\nman \u003ccommand\u003e\nman ls\nman su\nman ssh\n```\n* en: Where program was installed\n```bash\nwhich\nwhich calendar\nwhich nano\nwhich gedit\n```\n* en: Used to examine or control the kernel ring buffer.\n```bash\ndmesg\n```\n\n## Advanced Commands\n\n* [Install Package](install-package.md)\n* [Update \u0026 Upgrade](update-and-upgrade.md)\n* [Shotcut Terminal](create-personal-shotcut-terminal.md)\n* [Permission](permission.md)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatancabral%2Flinux-learn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatancabral%2Flinux-learn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatancabral%2Flinux-learn/lists"}