投稿時間:2023-08-07 04:04:54 RSSフィード2023-08-07 04:00 分まとめ(6件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
海外TECH DEV Community The Complete Guide to Becoming a Web Developer: Part 6 https://dev.to/aradwan20/the-complete-guide-to-becoming-a-web-developer-part-6-4ol5 The Complete Guide to Becoming a Web Developer Part Welcome back to the series “Becoming a Web Developer part If you are new here you can start with this list   part  part  part  part part In this part we will discuss the terminal and most used commands for web developers and for more commands and details you can visit here Now If you re a web developer software engineer or just a tech enthusiast you ve probably used Linux commands and the terminal But if you re not let s get you to learn what are they and why are they so important Let s dive in Backend What exactly is the backend Tips to Get comfortable with the TerminalListing and PathThe ls CommandThe pwd CommandNavigation and PathsThe cd commandRelative PathsAbsolute PathsCreating Directories Folders The touch CommandRemoving Files amp FoldersMore Tips and Best PracticesCommon Mistakes and How to Avoid ThemConclusionAdditional ResourcesThe terminal also known as the command line interface CLI is a tool that allows us to interact with our computer using text based commands It s a powerful tool that gives us direct access to the operating system and allows us to perform tasks more efficiently than we could with a graphical user interface GUI Linux commands are the language we use to communicate with the terminal This originated in the Unix operating system but is now used in many other systems including Linux and MacOS So why should you as a web developer or software engineer care about Linux commands and the terminal Here are a few reasons Efficiency Linux commands can perform complex tasks quickly and with fewer steps than a GUI Control The terminal gives you more control over your system You can access and modify files that are not visible or accessible in a GUI Scripting Linux commands can be combined into scripts allowing you to automate repetitive tasks Development Tools Many tools for developers like Git and Node js are primarily used through the terminal Troubleshooting Understanding Linux commands can help you diagnose and fix problems on your system In this article we ll start with the basics and what you need to learn to start with Linux as a software developer or web developer Backend Before we dive into the commands and the terminal let s take a moment to understand what s happening on the backend side of things If you re new to web development you might be wondering What exactly is the backend In the context of web development the backend refers to the server side of an application This is the part of the software that users don t see It s where the magic happens data is processed stored and sent back to the user The backend is responsible for business logic database interactions server configuration and much more Imagine you re visiting an online store The beautiful webpage you see with all its images buttons and menus is the front end It s what you interact with But when you click on a product to view more details or place an order your request is sent to the backend The backend retrieves the product details from the database or processes your order then sends the information back to the frontend to be displayed to you So why is understanding the backend important for learning Linux commands and the terminal Well as a backend developer or even a full stack developer someone who works on both the frontend and backend you ll often find yourself working in a Unix like environment You ll need to navigate through your system s directories manipulate files install software and run scripts all using the terminal That s why getting comfortable with Linux commands is such a crucial skill In the following sections we ll start exploring these commands So buckle up and get ready for an exciting journey Tips to Get comfortable with the TerminalGetting comfortable with the terminal is a bit like learning to ride a bike It might seem intimidating at first but with practice it becomes second nature Here are some tips and strategies to help you become more comfortable with the terminal Practice RegularlyThe best way to get comfortable with the terminal is to use it regularly Try to incorporate it into your daily workflow Need to create a new directory Use mkdir Need to move a file Use mv The more you use the terminal the more familiar it will become Learn the BasicsStart with the basic commands like ls pwd cd mkdir touch rm and cp Understand what they do and practice using them Once you re comfortable with the basics you can move on to more advanced commands and concepts Use the man CommandThe man command is your built in manual Use it to learn about other commands and their options For example man ls will show you the manual for the ls command including a description of what it does and a list of its options Don t Be Afraid to Make MistakesIt s okay to make mistakes In fact making mistakes is a great way to learn If you type a command and it doesn t work try to figure out why Is there a typo in the command Are you in the right directory Did you forget an option Customize Your TerminalCustomizing your terminal can make it more pleasant to use You can change the colors prompt and even add features like auto completion and command aliases There are also different terminal emulators you can try each with their own set of features Learn to Use a Text EditorKnowing how to use a text editor from the terminal is a valuable skill Whether it s Vim Emacs or Nano choose one and learn the basics You ll need this skill for editing configuration files writing scripts and more Explore and Have FunFinally don t forget to have fun A terminal is a powerful tool and learning to use it effectively can open up new possibilities Try new commands write scripts and automate tasks The more you explore the more comfortable you ll become Listing and PathLet s kick things off with two of the most basic yet essential Linux commands ls and pwd These commands are your bread and butter when it comes to navigating the terminal They re the equivalent of looking around and checking your map in a new city The ls CommandThe ls command stands for list As the name suggests it lists the contents of a directory When you type ls into the terminal and hit enter it will display all the files and directories in your current location Here s an example lsDesktop Downloads Pictures Documents MusicThis example ls has listed five directories Desktop Downloads Pictures Documents and Music As mentioned ls lists the contents of a directory But it can do much more when used with options Let s look at some examples ls l This option displays the contents in a long format which includes additional information such as the file permissions number of links owner group size and time of last modification ls ltotal drwx YourUsername staff Mar Desktopdrwx YourUsername staff Mar Documentsdrwx YourUsername staff Mar Downloadsdrwx YourUsername staff Mar Musicdrwx YourUsername staff Mar Picturesls a This option shows all files including hidden ones In Unix like systems files that start with a dot are hidden ls a bash history bash profile Desktop Documents Downloads Music Picturesls R This option lists the contents of directories recursively meaning it will show the contents of the directories within the current directory and so on ls R Desktop Documents Downloads Music Pictures Desktop file txt file txt Documents doc docx doc docx Downloads image jpg image jpg Music song mp song mp Pictures photo png photo pngThe pwd CommandThe pwd command stands for print working directory It tells you where you currently are in your system s directory structure Think of it as checking your current location on a map Here s an example pwd Users YourUsernameIn this example pwd has printed the path to the current directory which is the user s home directory pwd P This option prints the physical directory without any symbolic links If you re in a directory that is a symbolic link a file that points to another file or directory pwd P will show the actual directory not the linked one pwd P Users YourUsername ActualDirectoryIn this example even if you navigated to the directory using a symbolic link pwd P shows the path to the actual directory These two commands ls and pwd are your starting point for navigating the terminal Practice using them until you re comfortable In the next sections we ll learn how to move around the directory structure and manipulate files So stay tuned P S Remember you can always use the man command to read the manual and learn more about these commands and their options For example man ls will show the manual for the ls command Navigation and PathsChanging directories is a fundamental task you ll do in the terminal It s like navigating through folders in a graphical file explorer but instead you re using text commands The command to change directories in Unix based systems is cd which stands for change directory Let s start with the basics If you want to move into a directory you type cd followed by the name of the directory For example if you have a directory named projects you can move into it with The cd commandcd projectsNow what if you want to move back to the previous directory You can use to represent the parent directory So to move back you can do cd You can also use to move multiple levels up For example cd will move two levels up If you want to go to your home directory you can use the cd command without any arguments cdYou can also use to represent your home directory So cd will also take you home What about if you want to go to a specific directory no matter where you currently are You can do this by providing the absolute path to the directory For example cd usr local binThis will take you to the directory usr local bin regardless of your current directory Remember the terminal is case sensitive So cd projects is different from cd Projects Also if the directory name has spaces you need to enclose it in quotes For example cd My Projects Or you can escape the space with a backslash cd My ProjectsRelative PathsA relative path is a path that starts from your current directory It s relative to where you are right now in the file system For example if you re in a directory called projects and there s a subdirectory in it called myapp the relative path to myapp is simply myappcd myappcd You can use this relative path with commands like cd to move into myapp Relative paths can also use special directory names like which represents the current directory and which represents the parent directory Absolute PathsAn absolute path on the other hand is a path that starts from the root of the file system It s absolute because it points to the same location no matter where you currently are in the file system An absolute path always starts with a For example the absolute path to a directory myapp located directly under projects in your home directory might look something like the following You also can use this absolute path with cd to go directly to myapp no matter your current location home username projects myappcd home username projects myappP S If you re moving around directories close to your current location relative paths are simpler If you re jumping to a directory far from your current location absolute paths can be more direct Creating Directories Folders Creating new directories or folders is a common task when organizing your files or setting up new projects In the terminal you can create directories using the mkdir command which stands for make directory The basic usage of mkdir is straightforward Just type mkdir followed by the name of the directory you want to create For example to create a directory named myproject you would use mkdir myprojectThis will create a new directory named myproject in your current directory You can verify that the directory was created using the ls command lsIf myproject was created successfully you should see it listed in the output of ls You can also create a directory in a different location by specifying a path For example to create a directory named myproject in the projects directory you would use mkdir projects myprojectThis assumes that the projects directory already exists If it doesn t mkdir will give an error However you can tell mkdir to create any necessary parent directories by using the p option mkdir p projects myprojectThis will create both projects and myproject if they don t already exist The touch CommandThe touch command is a standard command used in UNIX Linux operating system which is used to create change and modify timestamps of a file Let s say you want to create a new file named example txt You can do this using the touch command like so touch example txtIf the file example txt does not already exist the touch command will create a new file with this name If the file already exists touch will update the last modified time of the file Removing Files amp FoldersThe rm and rmdir commands are used to remove files and directories respectively The rm command removes specified files For example to remove a file named example txt you would use the rm command like this rm example txtBe careful when using rm as it deletes files permanently It s not like moving a file to the trash bin it s more like shredding that file The rmdir command removes empty directories To remove a directory it must be empty of files and other directories Here s how you would remove a directory named example directory rmdir example directoryIf you want to remove a directory and its contents you can use the rm command with the r or recursive flag This tells rm to remove the directory and its contents recursively Be very careful when using this command as it will permanently delete the directory and everything within it rm r example directoryIn summary touch is used to create or update files rm is used to remove files and directories and rmdir is used to remove empty directories More Tips and Best PracticesMaster the basics Start with the basic commands like ls cd pwd touch rm and mkdir Once you re comfortable with these you can start learning more advanced commands Use Tab Completion This is a handy feature that allows you to auto complete file and directory names Simply start typing the name and then press Tab to auto complete it Learn to use the man pages The man command followed by any other Linux command will display the manual page for that command This is a great way to learn what a command does and how to use it Use the history command The history command will show you the last commands you ve used This can be very helpful if you need to repeat a command or can t remember a command you used previously Learn to use pipes and redirection Pipes and redirection gt gt gt lt are powerful features that allow you to chain commands together or redirect input and output Common Mistakes and How to Avoid ThemDeleting the wrong file Always double check the file name before running a rm command You might also want to use the i interactive option with rm to confirm before deleting Using wildcards carelessly Wildcards like can be very useful but they can also be dangerous if used carelessly For example rm will delete all files in the current directory Not understanding command options Before using an option like r with rm make sure you understand what it does The man pages are a great resource for this Overusing sudo The sudo command gives you superuser privileges which means you can do things that regular users can t like deleting system files Use sudo sparingly and only when necessary Not backing up data Always back up important data While Linux commands can be powerful they can also be destructive if used incorrectly ConclusionWe ve taken quite a journey through the world of Linux commands and the terminal We started with the basics learning about commands like ls and pwd and then moved on to making directories removing files and understanding man pages and flags We ve also discussed some common mistakes and best practices to keep in mind when working with the terminal Remember don t be discouraged if you don t remember all the commands or concepts right away Keep practicing keep experimenting and before you know it you ll be wielding the terminal like a pro Additional ResourcesFor those of you who are eager to continue your journey with Linux commands and the terminal here are some additional resources that you might find helpful The Unix Shell A great tutorial for beginners from Software Carpentry Linux Command Line Basics A free course from Udacity that covers the basics of the Linux command line Advanced Bash Scripting Guide For those interested in scripting this guide is a comprehensive resource Explain Shell A handy tool that explains what each part of a Unix command does ManKier Another great tool for understanding Unix commands It provides explanations for commands and their options 2023-08-06 18:28:40
Apple AppleInsider - Frontpage News iPhone 15 Ultra case photos leak shows rumored 'Action' button https://appleinsider.com/articles/23/08/06/iphone-15-ultra-case-photos-leak-shows-rumored-action-button?utm_medium=rss iPhone Ultra case photos leak shows rumored x Action x buttonPhotographs of cases purportedly for the iPhone Ultra goes along with rumors Apple is replacing the mute switch with a third Action button on the side of the smartphone via MajinBuOfficial XRumors have spread for quite a while claiming that the days of the mute switch are numbered and that it will be replaced by a multi function Action button A Sunday photo leak showing what could be Apple cases for the inbound highest specification model certainly leans into those rumors Read more 2023-08-06 18:53:53
ニュース BBC News - Home Donald Trump says he will ask the Judge to step aside https://www.bbc.co.uk/news/world-us-canada-66422516?at_medium=RSS&at_campaign=KARANGA election 2023-08-06 18:02:26
ニュース BBC News - Home Netball World Cup final 2023: England 45-61 Australia - Roses miss out on historic title https://www.bbc.co.uk/sport/netball/66423459?at_medium=RSS&at_campaign=KARANGA Netball World Cup final England Australia Roses miss out on historic titleEngland s wait for a first Netball World Cup title continues after Australia defeat the Roses to win the event for a th time 2023-08-06 18:48:53
ニュース BBC News - Home Slovenia floods 'worst-ever natural disaster' https://www.bbc.co.uk/news/world-europe-66423977?at_medium=RSS&at_campaign=KARANGA dollars 2023-08-06 18:35:08
ニュース BBC News - Home Arsenal beat Manchester City to win Community Shield - highlights https://www.bbc.co.uk/sport/av/football/66424369?at_medium=RSS&at_campaign=KARANGA Arsenal beat Manchester City to win Community Shield highlightsWatch highlights as Arsenal beat Manchester City on penalties after Leandro Trossard s st minute equaliser to win the Community Shield at Wembley 2023-08-06 18:38:53

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)