Your prompt should show you where you are, but just in case it doesn't, you can use pwd or echo $PWD. Some tools require at least one slash, and/or do not allow paths that start with - (which usually introduces options) or occasionally other characters. same as $PWD), ~- is wherever you were before (same as $OLDPWD). There are numerous expansions starting with ~ (which only works at the start of an argument or after a :), which become an absolute path starting with /: ~ is your home directory (same as $HOME), ~someuser is another user's home directory, ~ is the current directory (but expanded out, unlike. is the parent directory (these are both relative). Some general directory rules that work with all tools: / is the root directory, and is the start of an absolute path anything that doesn't start with / or something that expands to it is a relative path. Passing - goes back to whatever directory you were previously in. Passing no argument changes to your home directory. , which is mostly not special except for ls itself and a few other tools)Ĭd changes the current directory to its argument. There are numerous arguments controlling what and how much is shown particularly note ls -a is needed to show so-called hidden files (those that start with a. Ls lists the contents of the current directory ("folder" in Windows terms), or of the argument you pass. Some tools fail to handle paths with spaces in them no matter what you do, so it is a good idea to avoid spaces in important directory names. Surrounding the whole thing in dollar-single quotes $'string' (this last is supported in common interactive shells but not all shells, but is most sensible from a programmer's perspective). Surrounding the whole thing in double quotes (use backslash before any of \ " ` $ it is generally impossible to represent a ! unless you disable history expansion), or Surrounding the whole thing in single quotes (easiest to remember since there are no exceptions, but you can't represent a ' itself - but remember, you are allowed to switch between quoting styles within an argument, so you can write echo 'You can'\''t stop me!' or echo 'You can'"'"'t stop me!'), Preceding individual characters with a backslash to represent them literally (does not work for newline, which is instead removed), In the shell, you may have to quote some characters (including spaces and several punctuation symbols), which can be done in 4 ways: If yours is not shown, get more details on. Choose your Linux distribution to get detailed installation instructions. Tab completion of non-path arguments sometimes works (often enough for it to be a useful habit). Install CMake on your Linux distribution. Tab completion of paths should usually work. I've tried to strip these to the minimum you need to get started, but probably failed: See details in reference.There are some basic commands you absolutely need to know, if you are working in the shell. Optional steps for subscription on release candidates. Sudo apt-get install kitware-archive-keyring Sudo rm /usr/share/keyrings/kitware-archive-keyring.gpg Install the kitware-archive-keyring package to ensure that your keyring stays up to date as Kitware rotate the keys:. ![]() Add the repository to your sources list and update.įor Ubuntu Jammy Jellyfish (22.04): echo 'deb jammy main' | sudo tee /etc/apt//kitware.list >/dev/nullįor Ubuntu Focal Fossa (20.04): echo 'deb focal main' | sudo tee /etc/apt//kitware.list >/dev/nullįor Ubuntu Bionic Beaver (18.04): echo 'deb bionic main' | sudo tee /etc/apt//kitware.list >/dev/null.Wget -O - 2>/dev/null | gpg -dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null ![]()
0 Comments
Leave a Reply. |