{"id":19327821,"url":"https://github.com/ekedonald/linux-practice-project","last_synced_at":"2026-06-15T03:32:24.893Z","repository":{"id":192062016,"uuid":"686028238","full_name":"ekedonald/Linux-Practice-Project","owner":"ekedonald","description":"This is a Linux Practice Project that focuses on the following concepts: Navigating The Command Line Interface, File Manipulation, File Permission \u0026 Ownership, Archiving \u0026 Unarchiving, Package Management, Text Editor and Process Management.","archived":false,"fork":false,"pushed_at":"2023-10-12T22:49:38.000Z","size":15780,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-06T07:24:32.919Z","etag":null,"topics":["linux","linux-kernel","linux-shell"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ekedonald.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-09-01T15:07:01.000Z","updated_at":"2023-10-10T10:02:43.000Z","dependencies_parsed_at":"2024-11-10T02:18:51.554Z","dependency_job_id":"29911352-0d2e-42b9-a1ea-1a62c0d21910","html_url":"https://github.com/ekedonald/Linux-Practice-Project","commit_stats":null,"previous_names":["ekedonald/1-linux-practice-project","ekedonald/linux-practice-project"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekedonald%2FLinux-Practice-Project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekedonald%2FLinux-Practice-Project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekedonald%2FLinux-Practice-Project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekedonald%2FLinux-Practice-Project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekedonald","download_url":"https://codeload.github.com/ekedonald/Linux-Practice-Project/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240429045,"owners_count":19799779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["linux","linux-kernel","linux-shell"],"created_at":"2024-11-10T02:18:54.072Z","updated_at":"2026-06-15T03:32:24.828Z","avatar_url":"https://github.com/ekedonald.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux Practice Project\n___\n\n## Introduction to Linux and Basic Commands\nLinux is a family of open-source Unix operating systems based on the Linux Kernel. They include Ubuntu, Fedora, Debian, openSUSE and Red Hat. Using Linux to manage a Virtual Private Server (VPS) is common practice.\n\nWhen operating Linux, you need to use a shell (a program that gives you access to the operating system's services). Most Linux distributions use a graphical user interface (GUI), making them beginner-friendly.\n\n## What Is a Linux Command?\nA Linux command is a program or utility that runs on the CLI - a console that interacts with the system via texts and processes.\n\nIt's similar to the Command Prompt application in Windows. Linux commands are executed on Terminal by pressing Enter at the end of the line. You can run commands to perform various tasks, from package installation to user management and file manipulation.\n\nHere's what a Linux command's general syntax looks like:\n\n```bash\nCommandName [options(s)] [parameter(s)]\n```\n\nA command may contain an option or a parameter. In some cases, it can still run without them. These are the three most common parts of a command:\n\nCommandName is the rule that you want to perform. Option or flag modifies a command's operation. To invoke it, use hyphens (-) or double hyphens (-).\n\nParameter or argument specifies any necessary information for the command.\n\n## TAKE NOTE\n1. All Linux commands are case-sensitive.\n\n## File Manipulation\n## 1. sudo command:\nThe sudo command stands for \"super user do\" and it lets you perform tasks that require administrative or root user permissions. When using the sudo command, the system will prompt the user to aunthenticate themselves with a password.\n\nThen, the Linux system will launch a timestap as a tracker. By default, every user can run sudo commands for 15 minutes/session.\n\nHere's the general syntax:\n\n```bash\nsudo (command e.g apt upgrade)\n```\n\nso it becomes:\n```bash\nsudo apt upgrade\n```\n\n![sudo_command](./images/1.%20sudo%20command.png)\n\n## 2. pwd command\nThe pwd command stands for \"print working directory\" and it is used to find the path of the current working directory.\n\nThe pwd command uses the following syntax:\n\n```bash\npwd [option]\n```\n\nIt has two acceptable options (flags):\n* -L or logical prints environment variable content, including symbolic links.\n\n* -P or physical prints the actual path of the current directory.\n\n```bash\npwd\n```\n\n![pwd_command](./images/2.%20pwd%20command.png)\n\n## 3. cd command:\nThe cd command is used to navigate through the Linux files and directories. Depending on your working directory, it requires either the full path or the directory name.\n\nRunning the command will take you to the home folder. Keep in mind that only users with sudo privileges can execute it.\n\nLet's say you're in /home directory and want to go to a sub directory called ekeikenna. Enter the following command:\n\n```bash\ncd ekeikenna\n```\n\n![cd_command1](./images/3.%20cd%20command1.png)\n\nIf you want to switch to a completely new directory, for example: /home/ekeikenna/Learning_Linux, you have to enter the cd followed by the directory's absolute path:\n \n ```bash\ncd /home/ekeikenna/Learning_Linux\n ```\n\n![cd_command2](./images/3.%20cd%20command2.png)\n\nTo move to the prevous directory. You enter the following command:\n\n```bash\ncd ..\n```\n\n![cd_command3](./images/3.%20cd%20command3.png)\n\n## 4. ls command:\nThe ls command is used to list files and directories running with a system. Running it without a flag will show the current working directory's content.\n\n```bash\nls\n```\n\n![ls_command1](./images/4.%20ls%20command1.png)\n\nTo see other directory's content, type ls followed by the desired path. For example, to view files in the Learning_Linux folder, enter:\n\n```bash\nls /home/ekeikenna/Learning_Linux\n```\n\n![ls_command2](./images/4.%20ls%20command2.png)\n\nHere are some flags you can use with the ls command:\n\n* lists all the files in the subdirectories:\n\n```bash\nls -R\n```\n\n![ls_command3](./images/4.%20ls%20command3.png)\n\n* shows hidden files in additon to the visible ones:\n\n```bash\nls -a\n```\n\n![ls_command4](./images/4.%20ls%20command4.png)\n\n* shows the file sizes in easily readable formats, suhc as MB, GB and TB:\n\n```bash\nls -lh\n```\n\n![ls_command5](./images/4.%20ls%20command5.png)\n\n## 5. cat command:\nThe concatenate \"cat\" command is the most frequently used Linux command. It lists, combines and writes file content to the standard output. To run the cat command, type cat followed by the file name and its extension. For instance:\n\n```bash\ncat sim1.txt\n```\n\n![cat_command1](./images/5.%20cat%20command1.png)\n\nHere are other ways to use the cat command, you can try this on your own:\n\n* Merge sim1.txt and sim2.txt and store the output in sim4.txt.\n\n```bash\ncat sim1.txt sim2.txt \u003e sim4.txt\n```\n\n![cat_command2](./images/5.%20cat%20command2.png)\n\n* Displays content in reverse order.\n\n```bash\ntac sim4.txt\n```\n\n![cat_command3](./images/5.%20cat%20command3.png)\n\n## 6. cp command:\nThe command is used to copy the content of files or directories. Take a look at the following use cases:\n\n* To copy a file from the current directory to another directory, enter cp followed by the file name and the destination directory. For example:\n\n```bash\ncp sim1.txt /home/ekeikenna/Learning_Linux/new_folder/\n```\n\n![cp_command1](./images/6.%20cp%20command1.png)\n\n* To copy files to a directory, enter the file names followed by the destination directory as shown below:\n\n```bash\ncp sim1.txt sim2.txt sim3.txt /home/ekeikenna/Documents\n```\n\n![cp_command2](./images/6.%20cp%20command2.png)\n\n* To copy the content of a file to a new file in the same directory, enter cp followed by the source file and the destination file as shown below:\n\n```bash\ncp sim1.txt sim4.txt\n```\n\n![cp_command3](./images/6.%20cp%20command3.png)\n\n* To copy an entire directoy, pass the -R flag before typing the source directory, followed by the destination directory as shown below:\n\n```bash\ncp -R /home/ekeikenna/Documents /home/ekeikenna/Documents_backup\n```\n\n![cp_command4](./images/6.%20cp%20command4.png)\n\n## 7. mv command:\nThe mv command is used to move and rename files and directories. Also, it doesn't produce an output upon execution. An example on how to use the mv command is shown below:\n\n```bash\nmv somefile /home/ekeikenna/Learning_Linux/new_folder\n```\n\n![mv_command1](./images/7.%20mv%20command1.png)\n\n* You can also use the mv command to rename file:\n\n```bash\nmv somefile newfile\n```\n\n![mv_command2](./images/7.%20mv%20command2.png)\n\n## 8. mkdir command:\nThe mkdir command is used to create one or multiple directories at once and set permissions for each them.  \n\nHere's the basic syntax:\n\n```bash\nmkdir [option] directory_name\n```\n\n* For example, you want to create a directory called Music:\n\n```bash\nmkdir Music\n```\n\n![mkdir_command1](./images/8.%20mkdir%20command1.png)\n\n* To make a new directory called Songs inside Music, use this command:\n\n```bash\nmkdir Music/Songs\n```\n\n![mkdir_command2](./images/8.%20mkdir%20command2.png)\n\n* The mkdir command accepts many such as: \n-p or -parents create a directory between two existing folders. For example, mkdir -p Music/2020/Songs will make the new \"2020\" directory.\n\n```bash\nmkdir -p Music/2020/Songs\n```\n![mkdir_command3](./images/8.%20mkdir%20command3.png)\n\n* To create a directory with full read, write and execute permissions for all users, enter the following command:\n\n```bash\nmkdir -m777 albums\n```\n\n![mkdir_command4](./images/8.%20mkdir%20command4.png)\n\nTo create a directory that prints a message for each created directory. Enter the following command:\n\n```bash\nmkdir -v artists\n```\n![mkdir_command5](./images/8.%20mkdir%20command5.png)\n\n## 9. rmdir command:\nTo permanently delete an empty directory, use the rmdir command. Remember that the user should have sudo privileges in the parent directory.\n\n* The command below shows how to remove an empty directory:\n\n```bash\nrmdir Music/2020\n```\n\n![rmdir_command](./images/9.%20rmdir%20command.png)\n\n## 10. rm command:\nThe rm command is used to delete files within directory. The user performing the command must have write permissions. Remember the directory's location as this will remove file(s) and you can't undo it.\n\n* Here's the general syntax:\n\n```bash\nrm html.txt\n```\n\n![rm_command1](./images/10.%20rm%20command1.png)\n\n* To remove multiple files, enter the following command:\n\n```bash\nrm ufc1.txt ufc2.txt ufc3.txt\n```\n\n![rm_command2](./images/10.%20rm%20command2.png)\n\n* To remove a file giving a system confirmation prompt before deletion:\n\n```bash\nrm -i ufc.txt\n```\n\n![rm_command3](./images/10.%20rm%20command3.png)\n\n* To delete files without system confirmation is shown below:\n\n```bash\nrm -f  yaml.txt\n```\n\n![rm_command4](./images/10.%20rm%20command4.png)\n\n* To delete files and directories recursively:\n\n```bash\nrm -r Songs\n```\n\n![rm_command5](./images/10.%20rm%20command5.png)\n\n## 11. touch command:\nThe touch command allows you to create an empty file.\n\n* For example, enter the following command to create an empty file:\n\n```bash\ntouch html.index\n```\n\n![touch_command](./images/11.%20touch%20command.png)\n\n## 12. locate command:\nThe locate command can find a file in the database system. However, you have to update the database before you use the locate command to fetch a file. To udpate the database is show below:\n\n`sudo updatedb`\n\n* Moreover, adding -i argument will turn off case sensitivity so you can search for a file even if you don't remember the exact name. The asterisk (*) wildcard can be used in combination to look for content that contains two or more words as shown below:\n\n```bash\nlocate -i html*\n```\n\n![locate_command](./images/12.%20locate%20command.png)\n\n## 13. find command:\nThe find command is used to search for files with a specific file directory. Here's the general syntax:\n\n```bash\nfind [path] [option] [expression]\n```\n\n* For example, to look for a file called html.index within the home directory and its subfolders is shown below:\n\n```bash\nfind /home -name index.html\n```\n![find_command](./images/13.%20find%20command.png)\n\n# 14. grep command:\nThe grep \"global regular expression print\" command lets you find a word by filtering through texts in a specific file. Once the grep command finds a match, it prints all lines that contain the specific pattern. This command helps filter through large log files.\n\n* An example of how to use grep is shown below:\n\n```bash\nls -l | grep snap\n```\n\n![grep_command](./images/14.%20grep%20command.png)\n\n## 15. df command:\nThe df command is used to report the sysem's disk space, shown in percentage and kilobyte (KB). Here's the general syntax:\n\n```bash\ndf [options] [file]\n```\n\n* For example, enter the follwoing command if you want to see the current directory's system disk space usage in a human readable format:\n\n```bash\ndf -h\n```\n\n![df_command1](./images/15.%20df%20command1.png)\n\n* The df command in combination with -m displays file system usage in MBs as shown below:\n\n![df_command2](./images/15.%20df%20command2.png)\n\n* The df command in combination with -T displays the file system in a new column as shwown below:\n\n```bash\ndf -T\n```\n\n![df_command3](./images/15.%20df%20command3.png)\n\n* The df command in combination with -k displays the file system usage in KBs as shown below:\n\n```bash\ndf -k\n```\n\n![df_command4](./images/15.%20df%20command4.png)\n\n## 16. du command:\nThe du command can be used to used to check how much space a file or directory takes up. It can be used to identify which part of the system uses the storage excessively.\n\n* Remember, you must specify the directory path when using the du command as shown below:\n\n```bash\ndu /home/ekeikenna/Learning_Linux/new_folder/Music/Music\n```\n\n![du_command1](./images/16.%20du%20command1.png)\n\n* The du command in combination with -s offers the total size of a specified folder as shown below:\n\n```bash\ndu -s\n```\n\n![du_command2](./images/16.%20du%20command2.png)\n\n* The du command in combination with -m provides folder and file information in MBs as shown below:\n\n```bash\ndu -m\n```\n\n![du_command3](./images/16.%20du%20command3.png)\n\n* The du command in combination with -k displays information in KBs as shown below:\n\n```bash\ndu -k\n```\n\n![du_command4](./images/16.%20du%20command4.png)\n\n* The du command in combination with -h displays information in human readble form in GBs as shown below:\n\n```bash\ndu -h\n```\n\n![du_command5](./images/16.%20du%20command5.png)\n\n## 17. head command:\nThe head command allows you to view the first 10 lines of a text. Adding an option lets you change the number of lines shown. The head command is also used to output piped date to CLI.\n\nHere's the general syntax:\n\n```bash\nhead [option] [file]\n```\n\n* For instance, you want to view the first ten line of document_list, located in the current directory:\n\n```bash\nhead document_list\n```\n\n![head_command1](./images/17.%20head%20command1.png)\n\n* The head combination with -n or -lines prints the first customized number of lines. For example, enter head -n 5 document_list to show the first five lines of documnet_list as shown below:  \n\n![head_command2](./images/17.%20head%20command2.png)\n\n* The head command in combination with -c or -bytes prints the first customized number of bytes of each file as shown below:\n\n```bash\nhead -c 100 document_list\n```\n\n![head_command3](./images/17.%20head%20command3.png)\n\n* The head command in combination with -q or -quiet will not print headers specifying the file name as shown below:\n\n```bash\nhead -q document_list\n```\n\n![head_command4](./images/17.%20head%20command4.png)\n\n## 18. tail command:\nThe tail command displays the last ten lines of a file. It allows users to check whether a file has a new data or read error messages. Here is the general format:\n\n```bash\ntail [option] [file]\n```\n\n* For example, you want to show the last ten lines of the document_list file:\n\n```bash\ntail -10 document_list\n```\n\n![tail_command](./images/18.%20tail%20command.png)\n\n## 19. diff command:\nShort for difference, the diff command compares two contents of a file line by line. After analyzing them, it will display the parts that do not match. Programmers often use the diff command to alter a program instead of rewriting the entire source code. Here's the general format:\n\n```bash\ndiff [option] file1 file2\n```\n\n* For example, you want to compare two files - document_list and document_list2\n\n```bash\ndiff document_list document_list2\n```\n\n![diff_command1](./images/19.%20diff%20command1.png)\n\n* The diff command in combination with -c displays the difference between two files in a context form as shown below:\n\n```bash\ndiff -c document_list document_list2\n```\n\n![diff_command2](./images/19.%20diff%20command2.png)\n\nThe diff command in combination with -u displays the output without redundant information as shown below:\n\n```bash\ndiff -u document_list document_list2\n```\n\n![diff_command3](./images/19.%20diff%20command3.png)\n\n## 20. tar command:\nThe tar command archives multiples files into a TAR file -a common Linux format similar to ZIP with optional compression. Here's the basic syntax:\n\n```bash\ntar [options] [archive_file] [file or directory to be archived]\n```\n\n* For instance, you want to create a new TAR archive named newarchive.tar in the current working directory:\n\n```bash\ntar -cvf newarchive.tar newfolder\n```\n\n![tar_command1](./images/20.%20tar%20command1.png)\n\n* The tar command accepts many options such as -x extracts a file as shown below:\n\n```bash\ntar -xvf newarchive.tar\n```\n\n![tar_command2](./images/20.%20tar%20command2.png)\n\n* The tar command in combination with -t lists the content of a compressed file as shown below:\n\n```bash\ntar -tf newarchive.tar\n```\n\n![tar_command3](./images/20.%20tar%20command3.png)\n\n* The tar command in combination with -u archives and adds to an existing archive file as shown below:\n\n```bash\ntar -uf newarchive.tar\n```\n\n![tar_command4](./images/20.%20tar%20command4.png)\n\n# File Permissions and Ownership\n## 21. chmod command:\nThe chmod command modifies a file or directory's read, write and execute permissions. In Linux, each file is associated with 3 user classes - owner, group member and others. Here's the basic syntax:\n\n```bash\nchmod [option] [permission] [file_name]\n```\n\n* For example, the owner is currently the only one with full permissions to change the files deploy1.yml and deploy2.yml. To allow group members and others read, write and execute the file, chnage it to the -rwxrwxrwx permission type, whose numeric value is 777:\n\n```bash\nchmod 777 deploy1.yml deploy2.yml\n```\n\n![chmod_command1](./images/21.%20chmod%20command1.png)\n\n* The chmod command in combination with -c or -changes displays information when a change is made as shown below:\n\n```bash\nchmod -c 776 deploy1.yml\n```\n\n![chmod_command2](./images/21.%20chmod%20command2.png)\n\n* The chmod command in combination with -f or -silent suppressed the error messages as shown below:\n\n```bash\nchmod -f 775 deploy1.yml\n```\n\n![chmod_command3](./images/21.%20chmod%20command3.png)\n\n* The chmod command in combination with -v or -verbose displays a diagnostic for each processed file as shown below:\n\n```bash\nchmod -v 774 deploy1.yml\n```\n\n![chmod_command4](./images/21.%20chmod%20command4.png)\n\n## 22. chown command:\nThe chown command lets you change the ownership of a file, directory or symbolic link to a specified username. Here's the basic format:\n\n```bash\nchown [options] owner[:group] file(s)\n```\n\n* For exampe, you want to make fabian the owner of deploy1.yml:\n\n```bash\nsudo chown fabian deploy1.yml\n```\n\n![chown_command](./images/22.%20chown%20command.png)\n\n## 23. jobs command:\nA job is a process that the shell starts. The job commands will display all the running processes along with their statuses. Remember that this command is only available in csh, bash, tcsh and ksh shells. This is the basic syntax:\n\n```bash\njobs [options] jobID\n```\n\nTo check the status of jobs in the current shell, simply enter jobs to the CLI. Here are some options you can use -l list process IDs along with their information, -n lists jobs whose statuses have changed since the last notification and -p lists process IDs only.\n\n![jobs_command](./images/23.%20jobs%20command.png)\n\n## 24. kill command:\nUse the kill command to terminate an unresponsive program manually. It will signal misbehaving applications and instruct them to kill their processes.\n\n* To kill a program, you must know its process idenfication number (PID). If you don't know the PID, run the following command:\n\n```bash\nps ux\n```\n\n![ps_ux_command](./images/24.%20ps%20ux%20command.png)\n\n* After knowing what signal to use add the program's Process ID (PID), enter the following syntax:\n\n```bash\nkill [signal_option] pid\n```\n\nThere are 64 signals that you can use, but these two are among the most commonly used:\n\n![kill_command1](./images/24.%20kill%20command1.png)\n\n* SIGTERM (15) requests a program to stop running and gives it some time to save all its progress. The system will use this by default if you don't specify the signal when entering the kill command. SIGKILL (9) forces program to stop and you will lose unsaved progress. For example, the program's PID is 63773 and you want to force it to stop:\n\n```bash\nkill SIGKILL 63773\n```\n\n![kill_command2](./images/24.%20kill%20command2.png)\n\n## 25. ping command:\nThe ping command is one of the most used basic Linux commands for checking whether a network or a server is reachable. In addition, it is used to troubleshoot various connectivity issues. Here's the general format:\n\n```bash\nping [option] [hostname_or_IP_address]\n```\n\n* For example, you want to know whether you can connect to Google and measure its response time:\n\n```bash\nping google.com\n```\n\n![ping_command](./images/25.%20ping%20command.png)\n\n## 26. wget command:\nThe Linux command line lets you download files from the internet using the wget command. It works in the background without hindering other running processes. To use it, enter the following command:\n\n```bash\nwget [option] [url]\n```\n\n* For example, enter the follwoing command to download the latest version of WordPress:\n\n```bash\nwget https://wordpress.org/latest.zip\n```\n\n![wget_command](./images/26.%20wget%20command.png)\n\n## 27. uname command:\nThe uname or unix name command will print detailed information about your Linux system and hardware. This includes the machine name, operating system and kernel. To run this command, simply enter uname into your CLI. Here's the basic syntax:\n\n```bash\nuname [option]\n```\n\n* These are the acceptable options to use -a prints all the system information, -s prints the kernel name and -n prints the system's node hostname.\n\n![uname_command](./images/27.%20uname%20command.png)\n\n## 28. top command:\nThe top command in Linux Terminal will display all the running processes and dynamic real-time view of the current system. It sums up the resouce utilization from CPU to memory usage.\n\n```bash\ntop\n```\n\n![top_command](./images/28.%20top%20command.png)\n\n## 29. history:\nWith history, the system will display up to 500 previously executed commands, allowing you to reuse them without re-entering. Keep in mind that only users with sudo privileges can execute this command. How this utility runs also depends on Linux shell you use. To run it, enter the command below:\n\n```bash\nhistory [option]\n```\n\n* This command supports many options, such as -c clears the complete history list, -d offset deletes the history entry at the OFFSET position and -a appends histroy lines.\n\n![history_command](./images/29.%20history%20command1.png)\n\n## 30. man command:\nThe man command provides a user manual of any commands or utilities you can run in Terminal including the name, description and options. It cosists of nine sections:\n\n* Executable programs or shell commands system calls Library calls Games Special files File formats and conventions System administration commands Kernel routines Miscellaneous to display the complete manual, enter:\n\n```bash\nman [command_name]\n```\n\n* For example, you want to access the manual for the ls command:\n\n```bash\nman ls\n```\n\n![man_command](./images/30.%20man%20command.png)\n\n* Enter this command if you want to specify the displayed section:\n\n```bash\nman [option] [section_number] [command_name]\n```\n\n* For instance, you want to see section 2 of the ls command manual:\n\n```bash\nman 2 ls\n```\n\n## 31. echo command:\nThe echo command is a built-in utility that displays a line of text or string using the standard output. Here's the basic syntax:\n\n```bash\necho [option] [string]\n```\n\nThis command supports many options which are shown below:\n\n* Using -e enables the interpreation of \\c which produced after it's positon in the text.\n\n```bash\necho -e \"Lionel Messi \\cin Miami\"\n```\n\n![echo_command1](./images/31.%20echo%20command1.png)\n\n*  Using -e enables the interpretation of \\b which removes the space before its position in the text.\n\n```bash\necho -e \"The \\bWorld \\bIs \\bNot \\bEnough\"\n```\n![echo_command2](./images/31.%20echo%20command2.png)\n\n## 32. zip, unzip commands:\nThe zip command is used to compress your files into a ZIP file, a universal format commonly used on Linux. It can automatically choose the best compression ratio. The zip command is also useful for archiving files, directories and reducing disk usage. \n\n* To use it, enter the following syntax: \n\n```bash\nzip [options] zipfile file1 file2\n```\n\n* For example, you have a file named new.txt that you want to compress into archive.zip in the current directory:\n\n```bash\nzip archive.zip new.txt\n```\n\n![zip_command](./images/32.%20zip%20command1.png)\n\n* On the other hand, unzip command extracts the zipped files from an archive. Here's the general format:\n\n```bash\nunzip [option] file_name.zip\n```\n\n* So to unzip a file called archive.zip in the current directory, enter:\n\n```bash\nunzip archive.zip\n```\n\n![unzip_command](./images/32.%20unzip%20command1.png)\n\n## 33. hostname command:\nRun the hostname to know the system's hostname. You can execute it with or without an option. Here's the general syntax:\n\n```bash\nhostname [option]\n```\n\n* There are many optional flags to use including -a or -alias displays the hostname's alias, -A or -all-fqdns displays the machine's Fully Qualified Domain Name (FQDN), -i or -ip-address displays the machine's IP address. For example, enter the following command to kmow your computer's IP address:\n\n```bash\nhostname -i\n```\n\n![hostname_command](./images/33.%20hostname%20command.png)\n\n## 34. adduser, deluser commands:\nLinux is a multi-user system meaning more than one person can use it simultaneously, adduser is used to create a new account while the passwd command allows modify a password for a specific user. Only those with root privileges or sudo can run the adduser command.\n\nWhen you use the adduser command, it performs some major changes. Edits the /etc/passwd, /etc/shadow, /etc/group and /etc/gshadow files for the newly created accounts. Creates and populates a home directory for the user. Sets file permissions and ownerships to the home directory. Here's the basic syntax:\n\n```bash\nadduser [option] username\n```\n\n* To set password:\n\n```bash \npasswd the_password_combination\n```\n\n* For example, to add a new person named frank and modify the password, enter the following command simultaneously:\n\n```bash\nadduser frank\n```\n\n```bash\npasswd frank\n```\n\n![adduser_passwd_command](./images/34.%20adduser,%20passwd%20command.png)\n\n* To delete a user account, use the deluser commmand as shown below:\n\n```bash\ndeluser frank\n```\n\n![deluser_command](./images/34.%20deluser%20command.png)\n\n## 35. apt-get command:\napt-get is a command line for handling Advanced Package Tool (APT) libraries in Linux. It lets you retrieve information and bundles from auntheticated sources to mange, update, remove and install software and its dependencies. Running the apt-get command requires you to use sudo or root privileges.\n\n* Here's the main syntax:\n\n```bash\napt-get [options] (command)\n```\n\n* The apt-get: update synchronizes the package files from their sources, upgrade installs the lastes version of all installed packages, checks updates the package cache and checks broken dependencies.\n\n```bash\napt-get update\n```\n\n![apt_get_command](./images/35.%20apt-get%20command.png)\n\n## 36. nano, vi, jed commands:\nLinux allows users to edit and manage files via text editor, such as nano, vi or jed. nano and vi come wiht the operating system, while jed has to be installed. \n\n* The nano command denotes keywords and can work with most languages. To use it, enter the following command:\n\n```bash\nnano filename\n```\n\n![nano_command](./images/36.%20nano%20command.png)\n\n* vi uses the two operating modes to work - insert and command. insert is used to edit and create a text file. On the other hand, the command performs operations such as saving, opening, copying and pasting a file. To use vi on a file, enter:\n\n```bash\nvi filename\n```\n\n![vi_command](./images/36.%20vi%20command.png)\n\n* jed has a drop-down menu interface that allows users to perform actions without entering keyboard combinations or commands. Like vi, it has modes to load modules or plugins to write specific texts. To open the program, simply enter jed to then command line.\n\n![jed_command](./images/36.%20jed%20command.png)\n\n## 37. alias, unalias commands:\nalias allows you to create a shortcut with the same functionality as a command, file name or text. When executed, it instructs the shell to replace one string with another. To use the alias command, enter this syntax:\n\n```bash\nalias Name=String\n```\n\n* For example, you want to make k the alias for the kill command:\n\n```bash\nalias l='ls -ltr'\n```\n\n![alias_command](./images/37.%20alias%20command.png)\n\n* On the other hand, the unalias commadn deletes an existing alias. Here's what the general syntax looks like:\n\n```bash\nunalias [alias_name]\n```\n\n![unalias_command](./images/37.%20unalias%20command.png)\n\n## 38. su commad:\nThe switch user or su command allows you to run a program as a different user. It changes the adminstrative account in the current log-in session. This command is especially beneficial for accessing the system through SSH or using GUI display manager when the root user is unavailable. Here's the geberal syntax of the command:\n\n```bash\nsu [options] [username [argument]]\n```\n\nWhen executed without any option or argument, the su command runs through root privileges. It will prompt you to aunthenticate and use the privileges temporarily.\n\n* Here are some acceptable options to use -p or -preserve environment keeps the same shell environment, consisting HOME, SHELL, USER and LOGNAME; -s or -shell lets you specify a different shell environment to run; -l or -login runs a login script to switch to a different username. Executing it requires you to enter the user's password.\n\n![su_command](./images/38.%20su%20command.png)\n\n## 39. htop command:\nThe htop command is an interactive program that monitors system resources and server processes in real time. It is available on most Linux distributions and you can install it usimng the default package manager.\n\nCompared to the top command, htop has improvements and additonal features such as mouse operation and visual indicators. To use it, run the following command:\n\n```bash\nhtop [options]\n```\n\n* The -d or -delay flag shows the delay between updates in tenths of seconds as shown below:\n\n```bash\nhtop  -d 10\n```\n\n![htop_command1](./images/39.%20htop%20command1.png)\n\n* The -C or -no-color flag enables the monochrome mode as shown below:\n\n```bash\nhtop -C\n```\n\n![htop_command2](./images/39.%20htop%20command2.png)\n\n* The -h or -help flag displays the the help message as shown below:\n\n\n```bash\nhtop -h\n```\n\n![htop_command3](./images/39.%20htop%20command3.png)\n\n## 40. ps command:\nThe process status or ps command produces a snapshot of all running processes in your system.The static results are taken from the virtual files in the /proc file system.\n\nExecuting the ps command without an option or argument will list the running processes in the shell along with the unique process ID (PID), the type of the terminal (TTY), the running time (TIME) the command that launches the process (CMD).\n\n* The ps command in combination with -T displays all processes associated witht he current shell session as shown below:\n\n```bash\nps -T\n```\n\n![ps_command](./images/40.%20ps%20command.png)\n\n* The ps command in cobination with -u username lists processes associated with a specific user as shown below: \n\n```bash\nps -u\n```\n\n![ps_command2](./images/40.%20ps%20command2.png)\n\n* The ps command in combination with -A or -e flag shows all the running processes as shown below:\n\n```bash\nps -A\n```\n\n![ps_command3](./images/40.%20ps%20command3.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekedonald%2Flinux-practice-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekedonald%2Flinux-practice-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekedonald%2Flinux-practice-project/lists"}